1#ifndef VRPN_XINPUTGAMEPAD_H
2#define VRPN_XINPUTGAMEPAD_H
6#if defined(_WIN32) && defined(VRPN_USE_WINDOWS_XINPUT)
20 vrpn_XInputGamepad(
const char *name,
vrpn_Connection *c = NULL,
unsigned int controllerIndex = 0);
21 ~vrpn_XInputGamepad();
27 static int VRPN_CALLBACK handle_request_message(
void *selfPtr, vrpn_HANDLERPARAM data);
28 static int VRPN_CALLBACK handle_request_channels_message(
void *selfPtr, vrpn_HANDLERPARAM data);
29 static int VRPN_CALLBACK handle_last_connection_dropped(
void *selfPtr, vrpn_HANDLERPARAM data);
38 void update_vibration();
41 virtual vrpn_float64 normalize_axis(SHORT axis, SHORT deadzone)
const;
42 virtual vrpn_float64 normalize_trigger(BYTE trigger)
const;
43 virtual vrpn_float64 normalize_dpad(WORD buttons)
const;
46 unsigned int _controllerIndex;
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report whether something has changed or not (for servers) Optionally, tell what time to stamp ...
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report only if something has changed (for servers) Optionally, tell what time to stamp the val...
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
class VRPN_API vrpn_Connection
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY