mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 23:40:39 +00:00
e999444b23
0xA0 vibration cheat(Xinput) Syntax is: 0xA0NNLLLL 0x00MMRRRR where NN/MM is time vibration lasts LLLL/RRRR is the vibration power 0xA1 read value for the vibration(Xinput) from game memory Syntax is: 0xA1000000 0xNNNNNNNN where NNNNNNNN is the address that stores following values at offset: 0xNNNNNNNN + 0x0 Left Vibration power, 0xNNNNNNNN + 0x2 Right Vibration Power 0xNNNNNNNN + 0x4 Left Vibration time 0xNNNNNNNN + 0x6 Right Vibration time Left some room for other PPSSPP specific cheats(0xA2-0xAF)
23 lines
571 B
C++
23 lines
571 B
C++
#pragma once
|
|
|
|
#include "InputDevice.h"
|
|
#include "Xinput.h"
|
|
#include "Core/HLE/sceCtrl.h"
|
|
|
|
class XinputDevice final : public InputDevice {
|
|
public:
|
|
XinputDevice();
|
|
~XinputDevice();
|
|
virtual 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]{};
|
|
int prevVibrationTime = 0;
|
|
u32 prevButtons[4]{};
|
|
};
|