From 102d007cdadf569075bf96e37b3c1816afe8a647 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 6 May 2012 20:52:44 +0000 Subject: [PATCH] input: blacklist HDAPS as a joystick, it's not really a joystick. --- src/platform/sdl/sdlinput.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/platform/sdl/sdlinput.cpp b/src/platform/sdl/sdlinput.cpp index 5f3599b2..12ce710b 100644 --- a/src/platform/sdl/sdlinput.cpp +++ b/src/platform/sdl/sdlinput.cpp @@ -55,6 +55,15 @@ SdlInput::SdlInput() for (int i = 0; i < SDL_NumJoysticks(); i++) { SDL_Joystick *sdlstick = SDL_JoystickOpen(i); + + /* Blacklist HDAPS, it's not a real joystick */ + char const *name = SDL_JoystickName(i); + if (strstr(name, "HDAPS")) + { + SDL_JoystickClose(sdlstick); + continue; + } + Stick *stick = Input::CreateStick(); stick->SetAxisCount(SDL_JoystickNumAxes(sdlstick)); stick->SetButtonCount(SDL_JoystickNumButtons(sdlstick));