From 8c98c7b1415f3094cc7d16bc447ea07e805efdd1 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 29 Dec 2012 13:01:10 -0800 Subject: [PATCH] Reverse the analog Y for everyone. Verified XInput is still happy this way. --- Core/HLE/sceCtrl.cpp | 2 +- Windows/XinputDevice.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceCtrl.cpp b/Core/HLE/sceCtrl.cpp index 234bb3dc5f..d8998af521 100644 --- a/Core/HLE/sceCtrl.cpp +++ b/Core/HLE/sceCtrl.cpp @@ -163,7 +163,7 @@ void __CtrlSetAnalog(float x, float y) if (x < -1.0f) x = -1.0f; if (y < -1.0f) y = -1.0f; ctrlCurrent.analog[0] = (u8)(x * 127.f + 128.f); - ctrlCurrent.analog[1] = (u8)(y * 127.f + 128.f); + ctrlCurrent.analog[1] = (u8)(-y * 127.f + 128.f); } int __CtrlReadSingleBuffer(u32 ctrlDataPtr, bool negative) diff --git a/Windows/XinputDevice.cpp b/Windows/XinputDevice.cpp index 6f7687f49b..86fc0dab64 100644 --- a/Windows/XinputDevice.cpp +++ b/Windows/XinputDevice.cpp @@ -41,7 +41,7 @@ int XinputDevice::UpdateState() { if ( dwResult == ERROR_SUCCESS ) { this->ApplyDiff(state); Stick left = NormalizedDeadzoneFilter(state); - __CtrlSetAnalog(left.x, -left.y); + __CtrlSetAnalog(left.x, left.y); this->prevState = state; this->check_delay = 0; return 0;