Browse Source

stupid error

Wei Mingzhi 9 years ago
parent
commit
b7d5354c28
1 changed files with 7 additions and 1 deletions
  1. 7 1
      input.c

+ 7 - 1
input.c

@@ -1031,13 +1031,19 @@ PAL_InitInput(
       //
       // HACKHACK: applesmc shouldn't be considered as a real joystick
       //
-      if (strcmp(SDL_JoystickName(0), "applesmc") != 0)
+#ifdef __linux__
+      if (strcmp(SDL_JoystickName(0), "applesmc") == 0)
       {
          if (SDL_NumJoysticks() > 1)
          {
             g_pJoy = SDL_JoystickOpen(1);
          }
       }
+      else
+#endif
+      {
+         g_pJoy = SDL_JoystickOpen(0);
+      }
       if (g_pJoy != NULL)
       {
          SDL_JoystickEventState(SDL_ENABLE);