mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
0b5458f759
Refactor InputDevice to simplify it
20 lines
387 B
C++
20 lines
387 B
C++
#pragma once
|
|
|
|
#include "InputDevice.h"
|
|
#include "Xinput.h"
|
|
|
|
|
|
class XinputDevice final : public InputDevice {
|
|
public:
|
|
XinputDevice();
|
|
~XinputDevice();
|
|
virtual int UpdateState() override;
|
|
|
|
private:
|
|
void UpdatePad(int pad, const XINPUT_STATE &state);
|
|
void ApplyButtons(int pad, const XINPUT_STATE &state);
|
|
int check_delay[4]{};
|
|
XINPUT_STATE prevState[4]{};
|
|
u32 prevButtons[4]{};
|
|
};
|