11 #error Sorry, this class is only usable from code which includes windows.h
15 #include "vtlib/core/Engine.h"
23 bool Init() {
return InitRawDevices(); }
24 void SetSpeed(
float s) { m_fSpeed = s; }
25 float GetSpeed() {
return m_fSpeed; }
26 void SetAllowRoll(
bool b) { m_bAllowRoll = b; }
27 bool GetAllowRoll() {
return m_bAllowRoll; }
28 virtual void OnButtons(uchar b1, uchar b2, uchar b3) {}
33 void ProcessWM_INPUTEvent(LPARAM lParam);
38 typedef UINT (WINAPI *GetRawInputDeviceList_t)(PRAWINPUTDEVICELIST, PUINT, UINT);
39 typedef UINT (WINAPI *GetRawInputDeviceInfo_t)(HANDLE, UINT, LPVOID, PUINT);
40 typedef BOOL (WINAPI *RegisterRawInputDevices_t)(PCRAWINPUTDEVICE, UINT, UINT);
41 typedef UINT (WINAPI *GetRawInputData_t)(HRAWINPUT, UINT, LPVOID, PUINT, UINT);
42 GetRawInputData_t m_pfnGetRawInputData;
44 PRAWINPUTDEVICELIST g_pRawInputDeviceList;
45 PRAWINPUTDEVICE g_pRawInputDevices;
46 int g_nUsagePage1Usage8Devices;
49 bool InitRawDevices();