ppsspp/Windows/XinputDevice.h

26 lines
677 B
C
Raw Normal View History

#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);
2017-03-15 05:01:18 +00:00
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]{};
2020-10-08 21:49:14 +00:00
double prevVibrationTime = 0.0;
float prevAxisValue_[4][6]{};
bool notified_[XUSER_MAX_COUNT]{};
u32 prevButtons_[4]{};
2023-11-11 10:08:22 +00:00
double newVibrationTime_ = 0.0;
2017-03-15 05:01:18 +00:00
};