Browse Source

Decrease CPU load

Add a pause in the main loop to release CPU time.
DricomDragon 4 years ago
parent
commit
4a1e0a2d8c
1 changed files with 2 additions and 0 deletions
  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