1#ifndef VRPN_RUMBLEPAD_H
5#if defined(_WIN32) && defined(VRPN_USE_DIRECTINPUT)
12#ifndef DIRECTINPUT_VERSION
13#define DIRECTINPUT_VERSION 0x0800
26 GUID device_guid = GUID_NULL);
28 ~vrpn_DirectXRumblePad();
34 static int VRPN_CALLBACK handle_request_message(
void *userdata,
35 vrpn_HANDLERPARAM p );
36 static int VRPN_CALLBACK handle_request_channels_message(
void* userdata,
38 static int VRPN_CALLBACK handle_last_connection_dropped(
void *selfPtr, vrpn_HANDLERPARAM data);
46 static BOOL CALLBACK joystick_enum_cb(LPCDIDEVICEINSTANCE lpddi, LPVOID ref);
47 static DWORD CALLBACK thread_proc(LPVOID ref);
48 static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp);
49 static BOOL CALLBACK axis_enum_cb(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID ref);
52 inline void FAIL(
const char *msg) {
79 LPDIRECTINPUT8 _directInput;
82 LPDIRECTINPUTDEVICE8 _gamepad;
83 LPDIRECTINPUTEFFECT _effect;
85 DIPERIODIC _diPeriodic;
91#define VRPN_RUMBLEPAD_H
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...
int send_text_message(const char *msg, struct timeval timestamp, vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL, vrpn_uint32 level=0)
Sends a NULL-terminated text message from the device d_sender_id.
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
#define vrpn_gettimeofday