Minor fix for if SDL_JoystickInit is called more than once without a matching SDL_JoystickQuit. iOS-improvements
authorAlex Szpakowski <slime73@gmail.com>
Tue, 15 Jul 2014 02:04:08 -0300
branchiOS-improvements
changeset 94909eab796ea0b8
parent 9489 6cd0275146b3
child 9491 c652f2655d2a
Minor fix for if SDL_JoystickInit is called more than once without a matching SDL_JoystickQuit.
src/joystick/iphoneos/SDL_sysjoystick.m
     1.1 --- a/src/joystick/iphoneos/SDL_sysjoystick.m	Tue Jul 15 02:01:43 2014 -0300
     1.2 +++ b/src/joystick/iphoneos/SDL_sysjoystick.m	Tue Jul 15 02:04:08 2014 -0300
     1.3 @@ -49,7 +49,7 @@
     1.4      const char *hint = SDL_GetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK);
     1.5      if (!hint || SDL_atoi(hint)) {
     1.6          /* Default behavior, accelerometer as joystick */
     1.7 -        numjoysticks++;
     1.8 +        numjoysticks = 1;
     1.9      }
    1.10  
    1.11      return numjoysticks;