2003-06-17 05:01:49 +00:00
|
|
|
#ifndef INPUTHANDLER_DIRECTINPUT_H
|
|
|
|
|
#define INPUTHANDLER_DIRECTINPUT_H
|
|
|
|
|
|
|
|
|
|
#include "InputHandler.h"
|
2003-08-05 01:32:51 +00:00
|
|
|
#include "RageThreads.h"
|
2003-06-17 05:01:49 +00:00
|
|
|
|
|
|
|
|
struct DIDevice;
|
|
|
|
|
class InputHandler_DInput: public InputHandler
|
|
|
|
|
{
|
2003-08-05 01:32:51 +00:00
|
|
|
RageThread InputThread;
|
2003-07-14 06:27:20 +00:00
|
|
|
bool shutdown;
|
|
|
|
|
|
2003-07-20 19:16:49 +00:00
|
|
|
void UpdatePolled(DIDevice &device, const RageTimer &tm);
|
2003-07-14 06:27:20 +00:00
|
|
|
void UpdateBuffered(DIDevice &device, const RageTimer &tm);
|
|
|
|
|
void PollAndAcquireDevices();
|
|
|
|
|
|
2003-08-05 01:32:51 +00:00
|
|
|
static int InputThread_Start( void *p ) { ((InputHandler_DInput *) p)->InputThreadMain(); return 0; }
|
|
|
|
|
void InputThreadMain();
|
2003-06-17 05:01:49 +00:00
|
|
|
|
2003-07-15 03:35:47 +00:00
|
|
|
void StartThread();
|
|
|
|
|
void ShutdownThread();
|
|
|
|
|
|
2003-06-17 05:01:49 +00:00
|
|
|
public:
|
|
|
|
|
InputHandler_DInput();
|
|
|
|
|
~InputHandler_DInput();
|
|
|
|
|
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
|
|
|
|
|
void Update(float fDeltaTime);
|
2003-06-18 05:43:12 +00:00
|
|
|
void WindowReset();
|
2003-06-17 05:01:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|