2012-11-12 15:38:21 +00:00
|
|
|
#pragma once
|
2013-07-22 22:06:07 +00:00
|
|
|
|
2012-11-12 15:38:21 +00:00
|
|
|
#include "InputDevice.h"
|
|
|
|
#include "Xinput.h"
|
|
|
|
|
2013-07-22 22:06:07 +00:00
|
|
|
|
|
|
|
class XinputDevice : public InputDevice {
|
2012-11-12 15:38:21 +00:00
|
|
|
public:
|
|
|
|
XinputDevice();
|
2013-07-22 22:06:07 +00:00
|
|
|
~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;
|
2013-07-22 22:06:07 +00:00
|
|
|
};
|