mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
f44852bb18
Also missing virtual destructors, hidden non-overrides, etc.
23 lines
576 B
C++
23 lines
576 B
C++
#pragma once
|
|
|
|
#include <XInput.h>
|
|
#include "Core/HLE/sceCtrl.h"
|
|
#include "Windows/InputDevice.h"
|
|
|
|
class XinputDevice final : public InputDevice {
|
|
public:
|
|
XinputDevice();
|
|
~XinputDevice();
|
|
int UpdateState() override;
|
|
|
|
private:
|
|
void UpdatePad(int pad, const XINPUT_STATE &state, XINPUT_VIBRATION &vibration);
|
|
void ApplyButtons(int pad, const XINPUT_STATE &state);
|
|
void ApplyVibration(int pad, XINPUT_VIBRATION &vibration);
|
|
int check_delay[4]{};
|
|
XINPUT_STATE prevState[4]{};
|
|
XINPUT_VIBRATION prevVibration[4]{};
|
|
double prevVibrationTime = 0.0;
|
|
u32 prevButtons[4]{};
|
|
};
|