2012-11-12 15:38:21 +00:00
|
|
|
#pragma once
|
|
|
|
#include "InputDevice.h"
|
|
|
|
#include "Xinput.h"
|
|
|
|
|
|
|
|
class XinputDevice :
|
|
|
|
public InputDevice
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
XinputDevice();
|
2013-03-30 22:32:34 +00:00
|
|
|
virtual int UpdateState(InputState &input_state);
|
2013-04-08 01:41:26 +00:00
|
|
|
virtual bool IsPad() { return true; }
|
2012-11-12 15:38:21 +00:00
|
|
|
private:
|
2013-07-06 17:08:59 +00:00
|
|
|
void ApplyButtons(XINPUT_STATE &state, InputState &input_state);
|
2012-11-12 15:38:21 +00:00
|
|
|
int gamepad_idx;
|
|
|
|
int check_delay;
|
|
|
|
XINPUT_STATE prevState;
|
2013-07-06 17:08:59 +00:00
|
|
|
u32 prevButtons;
|
2012-11-12 15:38:21 +00:00
|
|
|
};
|
|
|
|
|