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 674d96a6f0
commit 22047cec12
8 changed files with 114 additions and 42 deletions
@@ -7,8 +7,15 @@ namespace TLAC::Components
if (index < 0 || index >= SLIDER_SENSORS)
return;
SensorPressureLevels[index] = value;
SensorTouched[index].IsTouched = value > 0;
uint32_t* ph = SerialState->sliderSerialResponse.sensors[index].pressureHistory;
ph[3] = ph[2];
ph[2] = ph[1];
ph[1] = ph[0];
ph[0] = value;
SerialState->sliderSerialResponse.scanMode = 1;
SerialState->sliderSerialResponse.scanCount = 1;
SerialState->sliderResponseCnt = 1;
}
void TouchSliderState::ResetSensors()