From 5113ab36cef54d1bce895a99406a93cd3b26a88b Mon Sep 17 00:00:00 2001 From: serk Date: Sun, 22 Jan 2017 02:33:38 +0100 Subject: [PATCH] frame rate to 25fps cpu usage 500% less --- VaporWaveWars/game.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/VaporWaveWars/game.cpp b/VaporWaveWars/game.cpp index 0b134e6..a6ca06c 100644 --- a/VaporWaveWars/game.cpp +++ b/VaporWaveWars/game.cpp @@ -21,6 +21,7 @@ Game* Game::i() { void Game::run() { sf::Clock c; sf::RenderWindow window(sf::VideoMode(W_WIDTH, W_HEIGHT), "( ( ( Radio Waves ) ) )", sf::Style::Close); + window.setFramerateLimit(25); window.setKeyRepeatEnabled(false); float oldTime = c.getElapsedTime().asSeconds(); while (isRunning) {