Pārlūkot izejas kodu

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

legacy
Sam Hocevar sam pirms 12 gadiem
vecāks
revīzija
102d007cda
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. +9
    -0
      src/platform/sdl/sdlinput.cpp

+ 9
- 0
src/platform/sdl/sdlinput.cpp Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt