src/joystick/SDL_joystick.c
changeset 9876 1496e502e51d
parent 9619 b94b6d0bff0f
child 9884 26b595dea221
     1.1 --- a/src/joystick/SDL_joystick.c	Fri Sep 18 16:22:23 2015 -0400
     1.2 +++ b/src/joystick/SDL_joystick.c	Sun Sep 20 23:08:36 2015 -0300
     1.3 @@ -669,14 +669,17 @@
     1.4              int i;
     1.5  
     1.6              /* Tell the app that everything is centered/unpressed...  */
     1.7 -            for (i = 0; i < joystick->naxes; i++)
     1.8 +            for (i = 0; i < joystick->naxes; i++) {
     1.9                  SDL_PrivateJoystickAxis(joystick, i, 0);
    1.10 +            }
    1.11  
    1.12 -            for (i = 0; i < joystick->nbuttons; i++)
    1.13 +            for (i = 0; i < joystick->nbuttons; i++) {
    1.14                  SDL_PrivateJoystickButton(joystick, i, 0);
    1.15 +            }
    1.16  
    1.17 -            for (i = 0; i < joystick->nhats; i++)
    1.18 +            for (i = 0; i < joystick->nhats; i++) {
    1.19                  SDL_PrivateJoystickHat(joystick, i, SDL_HAT_CENTERED);
    1.20 +            }
    1.21  
    1.22              joystick->force_recentering = SDL_FALSE;
    1.23          }