Explorar o código

Decrease CPU load

Add a pause in the main loop to release CPU time.
DricomDragon %!s(int64=4) %!d(string=hai) anos
pai
achega
4a1e0a2d8c
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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