summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-12 05:05:03 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-12 05:05:03 +0300
commitde11a42a6fee8575cc035c84636277f387299f36 (patch)
treef60113453f8e46a70c83330fa7d2780126d5de27 /src
parent54f52b52e89682af925294ff8184704ee60dafdc (diff)
downloadmanaplus-de11a42a6fee8575cc035c84636277f387299f36.tar.gz
manaplus-de11a42a6fee8575cc035c84636277f387299f36.tar.bz2
manaplus-de11a42a6fee8575cc035c84636277f387299f36.tar.xz
manaplus-de11a42a6fee8575cc035c84636277f387299f36.zip
Fix apply vsync with SDL2 by SDL2 function.
Diffstat (limited to 'src')
-rw-r--r--src/progs/dyecmd/client.cpp7
-rw-r--r--src/progs/manaplus/client.cpp6
2 files changed, 13 insertions, 0 deletions
diff --git a/src/progs/dyecmd/client.cpp b/src/progs/dyecmd/client.cpp
index 41bb7f3cb..eb40fd9c5 100644
--- a/src/progs/dyecmd/client.cpp
+++ b/src/progs/dyecmd/client.cpp
@@ -393,11 +393,18 @@ void Client::initSoundManager()
void Client::initGraphics()
{
+#ifndef USE_SDL2
WindowManager::applyVSync();
+#endif // USE_SDL2
+
runCounters = config.getBoolValue("packetcounters");
graphicsManager.initGraphics();
+#ifdef USE_SDL2
+ WindowManager::applyVSync();
+#endif // USE_SDL2
+
imageHelper->postInit();
setConfigDefaults2(config);
WindowManager::applyGrabMode();
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index a9735f43e..33d099678 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -592,10 +592,16 @@ void Client::initSoundManager()
void Client::initGraphics()
{
+#ifndef USE_SDL2
WindowManager::applyVSync();
+#endif // USE_SDL2
+
runCounters = config.getBoolValue("packetcounters");
graphicsManager.initGraphics();
+#ifdef USE_SDL2
+ WindowManager::applyVSync();
+#endif // USE_SDL2
imageHelper->postInit();
setConfigDefaults2(config);