cgv
|
interface class for gamepad drivers, when implementing your driver, provide a constructor with a single options argument of type std::string More...
#include <gamepad_driver.h>
Public Member Functions | |
virtual std::string | get_name ()=0 |
return name of driver | |
virtual void | scan_devices (std::vector< device_info > &infos)=0 |
scan all connected devices found by driver | |
virtual void | set_driver_state (bool enabled)=0 |
set the state to enabled or disabled | |
virtual void | set_device_state (void *device_handle, bool enabled)=0 |
set the state of a device to enabled or disabled | |
virtual bool | get_device_battery_info (void *device_handle, BatteryType &battery_type, float &fill_state)=0 |
return the battery type and state of a device, fill_state in [0,1] is only given for alkaline or nickel metal hydide batteries | |
virtual bool | query_device_key_event (void *device_handle, GamepadKeys &gk, KeyAction &action)=0 |
query event queue of given device for single gamepad key event | |
virtual bool | get_device_state (void *device_handle, gamepad_state &state)=0 |
retrieve the current state of gamepad stick and trigger positions | |
virtual bool | set_device_vibration (void *device_handle, float low_frequency_strength, float high_frequency_strength)=0 |
set the vibration strength between 0 and 1 of low and high frequency motors, return false if device is not connected | |
Public Attributes | |
unsigned | driver_index |
driver index is set during registration | |
interface class for gamepad drivers, when implementing your driver, provide a constructor with a single options argument of type std::string
Definition at line 11 of file gamepad_driver.h.
unsigned gamepad::gamepad_driver::driver_index |
driver index is set during registration
Definition at line 14 of file gamepad_driver.h.