test/testjoystick.c
changeset 10707 28c1a3f9c88b
parent 10597 7b2a0f5a4380
child 10737 3406a0f8b041
     1.1 --- a/test/testjoystick.c	Fri Dec 16 22:58:16 2016 +0100
     1.2 +++ b/test/testjoystick.c	Fri Dec 16 22:58:32 2016 +0100
     1.3 @@ -321,6 +321,7 @@
     1.4                      || (event.type == SDL_MOUSEBUTTONDOWN)) {
     1.5                      keepGoing = SDL_FALSE;
     1.6                  } else if (event.type == SDL_JOYDEVICEADDED) {
     1.7 +                    device = event.jdevice.which;
     1.8                      joystick = SDL_JoystickOpen(device);
     1.9                      if (joystick != NULL) {
    1.10                          SDL_assert(SDL_JoystickFromInstanceID(SDL_JoystickInstanceID(joystick)) == joystick);