Skip to content

Commit

Permalink
allow safely quitting the hotplug test by pressing button 0 on the jo…
Browse files Browse the repository at this point in the history
…ystick
  • Loading branch information
urkle committed Feb 4, 2014
1 parent 25fcc19 commit a98c477
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/testhotplug.c
Expand Up @@ -113,6 +113,10 @@ main(int argc, char *argv[])
{
SDL_HapticRumblePlay(haptic, 0.2, 250);
}
if (event.jbutton.button == 0) {
SDL_Log("Exiting due to button press of button 0\n");
keepGoing = SDL_FALSE;
}
break;
case SDL_JOYBUTTONUP:
SDL_Log("Button Release: %d\n", event.jbutton.button);
Expand Down

0 comments on commit a98c477

Please sign in to comment.