TLAC slider emulator: more directly emulate input data to avoid tracking section state, testing for ps4 official controller slider support

also allow slider in menu (toggle in keyconfig) and remove need for hardware slider disabling patch (patches/launcher)
This commit is contained in:
somewhatlurker
2020-08-11 00:55:20 +10:00
parent b8526d837e
commit 865a64bd96
8 changed files with 114 additions and 42 deletions
@@ -10,9 +10,37 @@
namespace TLAC::Components
{
struct TouchSliderSerialState
{
uint8_t padding[0x1960];
int sliderResponseCnt;
struct
{
int scanMode;
int scanCount;
struct
{
uint32_t pressureHistory[4]; // first: current, second: last sample, ...
} sensors[SLIDER_SENSORS];
} sliderSerialResponse;
struct
{
int scanMode;
int scanCount;
struct
{
uint32_t pressureHistory[4]; // first: current, second: last sample, ...
} sensors[SLIDER_SENSORS];
} sliderSerialResponseCopy; // the other one is copied here by the game, feel free to ignore it
};
struct TouchSliderState
{
uint8_t Padding0000[112];
uint8_t Padding0000[104];
TouchSliderSerialState* SerialState;
int32_t State;