Sfoglia il codice sorgente

Don't spin as quickly as possible in the checkkeys rendering loop

Sam Lantinga 3 anni fa
parent
commit
391dd0d94b
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      test/checkkeys.c

+ 3 - 0
test/checkkeys.c

@@ -228,6 +228,9 @@ loop()
     SDLTest_TextWindowDisplay(textwin, renderer);
     SDL_RenderPresent(renderer);
 
+    /* Slow down framerate */
+    SDL_Delay(100);
+
 #ifdef __EMSCRIPTEN__
     if (done) {
         emscripten_cancel_main_loop();