浏览代码

Decrease CPU load

Add a pause in the main loop to release CPU time.
DricomDragon 4 年之前
父节点
当前提交
4a1e0a2d8c
共有 1 个文件被更改,包括 2 次插入0 次删除
  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