浏览代码

stupid error

Wei Mingzhi 9 年之前
父节点
当前提交
b7d5354c28
共有 1 个文件被更改,包括 7 次插入1 次删除
  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
       // 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)
          if (SDL_NumJoysticks() > 1)
          {
          {
             g_pJoy = SDL_JoystickOpen(1);
             g_pJoy = SDL_JoystickOpen(1);
          }
          }
       }
       }
+      else
+#endif
+      {
+         g_pJoy = SDL_JoystickOpen(0);
+      }
       if (g_pJoy != NULL)
       if (g_pJoy != NULL)
       {
       {
          SDL_JoystickEventState(SDL_ENABLE);
          SDL_JoystickEventState(SDL_ENABLE);