mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-12 14:00:27 +02:00
UI: Flip Y analog direction based on config.
This commit is contained in:
1 parent
c9428975fe
commit
eca3a405b6
6 files changed
+72
-30
No files matched your search
@@ -306,10 +306,10 @@ int DinputDevice::UpdateState() {
|
||||
axis.deviceId = DEVICE_ID_PAD_0 + pDevNum;
|
||||
|
||||
auto axesToSquare = KeyMap::MappedAxesForDevice(axis.deviceId);
|
||||
ApplyNormalization(js, axesToSquare.leftXAxisId, axesToSquare.leftYAxisId);
|
||||
ApplyNormalization(js, axesToSquare.leftX.axisId, axesToSquare.leftY.axisId);
|
||||
// Prevent double normalization.
|
||||
if (axesToSquare.leftXAxisId != axesToSquare.rightXAxisId && axesToSquare.leftXAxisId != axesToSquare.rightYAxisId)
|
||||
ApplyNormalization(js, axesToSquare.rightXAxisId, axesToSquare.rightYAxisId);
|
||||
if (axesToSquare.leftX.axisId != axesToSquare.rightX.axisId && axesToSquare.leftX.axisId != axesToSquare.rightY.axisId)
|
||||
ApplyNormalization(js, axesToSquare.rightX.axisId, axesToSquare.rightY.axisId);
|
||||
|
||||
SendNativeAxis(DEVICE_ID_PAD_0 + pDevNum, js.lX, last_lX_, JOYSTICK_AXIS_X);
|
||||
SendNativeAxis(DEVICE_ID_PAD_0 + pDevNum, js.lY, last_lY_, JOYSTICK_AXIS_Y);
|
||||
|
||||
Reference in new issue
Block a user