summaryrefslogtreecommitdiff
path: root/src/progs/manaplus
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-08 08:21:38 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-08 08:21:38 +0300
commit8809fd2f14e8134e43c1f4249086d6f7a670a669 (patch)
tree97b9a932584e407661afa3d86135c5e459369eec /src/progs/manaplus
parent5d83c6b9c4fca96b6b0de312080346837b385f5f (diff)
downloadplus-8809fd2f14e8134e43c1f4249086d6f7a670a669.tar.gz
plus-8809fd2f14e8134e43c1f4249086d6f7a670a669.tar.bz2
plus-8809fd2f14e8134e43c1f4249086d6f7a670a669.tar.xz
plus-8809fd2f14e8134e43c1f4249086d6f7a670a669.zip
Apply fps limiter after state logic.
Diffstat (limited to 'src/progs/manaplus')
-rw-r--r--src/progs/manaplus/client.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index 01348db2d..376097a2e 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -1032,13 +1032,6 @@ int Client::gameExec()
PERF_STAT(9);
- BLOCK_START("~Client::SDL_framerateDelay")
- if (settings.limitFps)
- SDL_framerateDelay(&fpsManager);
- BLOCK_END("~Client::SDL_framerateDelay")
-
- PERF_STAT(10);
-
BLOCK_START("Client::gameExec 6")
if (mState == State::CONNECT_GAME)
{
@@ -1063,7 +1056,7 @@ int Client::gameExec()
}
BLOCK_END("Client::gameExec 6")
- PERF_STAT(11);
+ PERF_STAT(10);
if (mState != mOldState)
{
@@ -1688,6 +1681,14 @@ int Client::gameExec()
}
BLOCK_END("Client::gameExec 8")
}
+
+ PERF_STAT(11);
+
+ BLOCK_START("~Client::SDL_framerateDelay")
+ if (settings.limitFps)
+ SDL_framerateDelay(&fpsManager);
+ BLOCK_END("~Client::SDL_framerateDelay")
+
PERF_STAT(12);
PERF_NEXTFRAME();
PROFILER_END();