CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Windows/XinputDevice.h
Views: 1401
1
#pragma once
2
3
#include <XInput.h>
4
#include "Core/HLE/sceCtrl.h"
5
#include "Windows/InputDevice.h"
6
7
class XinputDevice final : public InputDevice {
8
public:
9
XinputDevice();
10
~XinputDevice();
11
int UpdateState() override;
12
13
private:
14
void UpdatePad(int pad, const XINPUT_STATE &state, XINPUT_VIBRATION &vibration);
15
void ApplyButtons(int pad, const XINPUT_STATE &state);
16
void ApplyVibration(int pad, XINPUT_VIBRATION &vibration);
17
int check_delay[4]{};
18
XINPUT_STATE prevState[4]{};
19
XINPUT_VIBRATION prevVibration[4]{};
20
double prevVibrationTime = 0.0;
21
float prevAxisValue_[4][6]{};
22
bool notified_[XUSER_MAX_COUNT]{};
23
u32 prevButtons_[4]{};
24
double newVibrationTime_ = 0.0;
25
};
26
27