Browse Source

Decrease CPU load

Add a pause in the main loop to release CPU time.
DricomDragon 4 năm trước cách đây
mục cha
commit
4a1e0a2d8c
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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