Sfoglia il codice sorgente

input: blacklist HDAPS as a joystick, it's not really a joystick.

legacy
Sam Hocevar sam 12 anni fa
parent
commit
102d007cda
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. +9
    -0
      src/platform/sdl/sdlinput.cpp

+ 9
- 0
src/platform/sdl/sdlinput.cpp Vedi File

@@ -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));


Caricamento…
Annulla
Salva