Преглед изворни кода

Allow quitting controllermap if there are no controllers attached

Sam Lantinga пре 5 година
родитељ
комит
8726f500ef
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      test/controllermap.c

+ 1 - 1
test/controllermap.c

@@ -746,7 +746,7 @@ main(int argc, char *argv[])
         return 2;
         return 2;
     }
     }
 
 
-    while (SDL_NumJoysticks() == 0) {
+    while (!done && SDL_NumJoysticks() == 0) {
         SDL_Event event;
         SDL_Event event;
 
 
         while (SDL_PollEvent(&event) > 0) {
         while (SDL_PollEvent(&event) > 0) {