test/testjoystick.c
changeset 6732 b4201930fb9f
parent 6731 572559876818
child 6733 cfef740efada
equal deleted inserted replaced
6731:572559876818 6732:b4201930fb9f
   235         joystick = SDL_JoystickOpen(atoi(argv[1]));
   235         joystick = SDL_JoystickOpen(atoi(argv[1]));
   236         while ( keepGoing ) {
   236         while ( keepGoing ) {
   237             if (joystick == NULL) {
   237             if (joystick == NULL) {
   238                 if ( !reportederror ) {
   238                 if ( !reportederror ) {
   239                     printf("Couldn't open joystick %d: %s\n", atoi(argv[1]), SDL_GetError());
   239                     printf("Couldn't open joystick %d: %s\n", atoi(argv[1]), SDL_GetError());
       
   240                     keepGoing = SDL_FALSE;
   240                     reportederror = SDL_TRUE;
   241                     reportederror = SDL_TRUE;
   241                 }
   242                 }
   242             } else {
   243             } else {
   243                 reportederror = SDL_FALSE;
   244                 reportederror = SDL_FALSE;
   244                 keepGoing = WatchJoystick(joystick);
   245                 keepGoing = WatchJoystick(joystick);