From b7c9e3c0fd5b17c6964c81bb742c2cef1630d50e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 19 Jan 2017 02:18:23 +0300 Subject: Fix vsync setting for SDL 2 builds. Also fix vsync setting in mode on. --- src/client.cpp | 3 ++- src/utils/env.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 40fa743d7..be9143062 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -350,6 +350,8 @@ void Client::gameInit() Dirs::initScreenshotDir(); + updateEnv(); + // Initialize SDL logger->log1("Initializing SDL..."); if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) @@ -396,7 +398,6 @@ void Client::gameInit() // !defined(__native_client__) && !defined(UNITTESTS) #endif // defined(USE_OPENGL) - updateEnv(); initGraphics(); touchManager.init(); diff --git a/src/utils/env.cpp b/src/utils/env.cpp index 332a13a0b..1006806fb 100644 --- a/src/utils/env.cpp +++ b/src/utils/env.cpp @@ -55,7 +55,7 @@ void updateEnv() break; case 2: setEnv("__GL_SYNC_TO_VBLANK", "1"); - setEnv("vblank_mode", "1"); + setEnv("vblank_mode", "2"); break; default: break; -- cgit v1.2.3-70-g09d2