Explorar o código

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

Sam Lantinga %!s(int64=4) %!d(string=hai) anos
pai
achega
391dd0d94b
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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();