diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-09-08 08:36:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-09-08 08:36:11 +0300 |
commit | 604cbb82a3e126e49142a4357a49998649227753 (patch) | |
tree | 57de624a394937175972b6d104d93a347eb15299 | |
parent | 8809fd2f14e8134e43c1f4249086d6f7a670a669 (diff) | |
download | manaverse-604cbb82a3e126e49142a4357a49998649227753.tar.gz manaverse-604cbb82a3e126e49142a4357a49998649227753.tar.bz2 manaverse-604cbb82a3e126e49142a4357a49998649227753.tar.xz manaverse-604cbb82a3e126e49142a4357a49998649227753.zip |
Draw at end of frame before fps limiter.
-rw-r--r-- | src/progs/manaplus/client.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp index 376097a2e..3ae4c2f76 100644 --- a/src/progs/manaplus/client.cpp +++ b/src/progs/manaplus/client.cpp @@ -1017,21 +1017,6 @@ int Client::gameExec() // This is done because at some point tick_time will wrap. lastTickTime = tick_time; - // Update the screen when application is visible, delay otherwise. - if (!WindowManager::getIsMinimized()) - { - frame_count++; - if (gui != nullptr) - gui->draw(); - mainGraphics->updateScreen(); - } - else - { - SDL_Delay(100); - } - - PERF_STAT(9); - BLOCK_START("Client::gameExec 6") if (mState == State::CONNECT_GAME) { @@ -1056,7 +1041,7 @@ int Client::gameExec() } BLOCK_END("Client::gameExec 6") - PERF_STAT(10); + PERF_STAT(9); if (mState != mOldState) { @@ -1682,6 +1667,21 @@ int Client::gameExec() BLOCK_END("Client::gameExec 8") } + PERF_STAT(10); + + // Update the screen when application is visible, delay otherwise. + if (!WindowManager::getIsMinimized()) + { + frame_count++; + if (gui != nullptr) + gui->draw(); + mainGraphics->updateScreen(); + } + else + { + SDL_Delay(100); + } + PERF_STAT(11); BLOCK_START("~Client::SDL_framerateDelay") |