Sfoglia il codice sorgente

Decrease CPU load

Add a pause in the main loop to release CPU time.
DricomDragon 4 anni fa
parent
commit
4a1e0a2d8c
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      main.cpp

+ 2 - 0
main.cpp

@@ -59,6 +59,8 @@ int main()
         // other draws
 
         SDL_Flip(screen);
+
+		SDL_Delay(16);
     } // end of main loop
 
     ///[4] Free components