From a8b48a094d7d3f16abe643ebf46c35483ffc2da2 Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Wed, 8 Oct 2014 16:37:04 -0500 Subject: [PATCH] Fix for PS3 controllers. --- src/gui/gamepad.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/gamepad.cpp b/src/gui/gamepad.cpp index 4615c82..873e3b5 100644 --- a/src/gui/gamepad.cpp +++ b/src/gui/gamepad.cpp @@ -64,6 +64,15 @@ void Gamepad::AllocateJoysticks(void) numHats[i] = SDL_JoystickNumHats(pad[i]); numAxes[i] = SDL_JoystickNumAxes(pad[i]); WriteLog("Gamepad: Joystick #%i: %s\n", i, padName[i]); + + // Ick, kludges already!!! + if (strcmp(padName[i], "Sony PLAYSTATION(R)3 Controller") == 0) + { + // We do this because these axes stay stuck on -32000 (buttons) + // or come on and stay on (D-pad). :-P + numAxes[i] = 8; + WriteLog("Gamepad: Blacklisting PS3 controller axes 8 on up...\n"); + } } } -- 2.37.2