Control: Change internal interfaces to batch-process input axis updates

These naturally come in bunches on many platforms like Android, so lay
some groundwork to also handle them in bunches to minimize locking in
the future.

Linux buildfix
This commit is contained in:
Henrik Rydgård committed 2023-08-31 11:55:53 +02:00
1 parent 3e6788defe
commit 80a99a67d9
12 files changed
+110 -103

No files matched your search

+2 -1
View File
@@ -208,7 +208,7 @@ void SendNativeAxis(InputDeviceID deviceId, int value, int &lastValue, InputAxis
axis.deviceId = deviceId;
axis.axisId = axisId;
axis.value = (float)value * (1.0f / 10000.0f); // Convert axis to normalised float
NativeAxis(axis);
NativeAxis(&axis, 1);
lastValue = value;
}
@@ -241,6 +241,7 @@ int DinputDevice::UpdateState() {
ApplyButtons(js);
if (analog) {
// TODO: Use the batched interface.
AxisInput axis;
axis.deviceId = DEVICE_ID_PAD_0 + pDevNum;