Explorar o código

Minor fix for if SDL_JoystickInit is called more than once without a matching SDL_JoystickQuit.

Alex Szpakowski %!s(int64=12) %!d(string=hai) anos
pai
achega
c81ce5a0a8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/joystick/iphoneos/SDL_sysjoystick.m

+ 1 - 1
src/joystick/iphoneos/SDL_sysjoystick.m

@@ -49,7 +49,7 @@ SDL_SYS_JoystickInit(void)
     const char *hint = SDL_GetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK);
     if (!hint || SDL_atoi(hint)) {
         /* Default behavior, accelerometer as joystick */
-        numjoysticks++;
+        numjoysticks = 1;
     }
 
     return numjoysticks;