Procházet zdrojové kódy

allow safely quitting the hotplug test by pressing button 0 on the joystick

Edward Rudd před 11 roky
rodič
revize
a98c477bc8
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      test/testhotplug.c

+ 4 - 0
test/testhotplug.c

@@ -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);