allow safely quitting the hotplug test by pressing button 0 on the joystick
authorEdward Rudd <urkle@outoforder.cc>
Tue, 04 Feb 2014 15:40:51 -0500
changeset 8169 663ba61243ff
parent 8168 76d51b45342e
child 8170 3b7bb407fcf7
allow safely quitting the hotplug test by pressing button 0 on the joystick
test/testhotplug.c
--- a/test/testhotplug.c	Tue Feb 04 12:28:35 2014 -0800
+++ b/test/testhotplug.c	Tue Feb 04 15:40:51 2014 -0500
@@ -113,6 +113,10 @@
                     {
                         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);