Ver código fonte

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

legacy
Sam Hocevar sam 12 anos atrás
pai
commit
102d007cda
1 arquivos alterados com 9 adições e 0 exclusões
  1. +9
    -0
      src/platform/sdl/sdlinput.cpp

+ 9
- 0
src/platform/sdl/sdlinput.cpp Ver arquivo

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


Carregando…
Cancelar
Salvar