summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 52d18477f..1ec0c683d 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -507,6 +507,21 @@ void Client::updateEnv()
setEnv("SDL_VIDEO_ALLOW_SCREENSAVER", "1");
else
setEnv("SDL_VIDEO_ALLOW_SCREENSAVER", "0");
+
+#ifndef WIN32
+ const int vsync = config.getIntValue("vsync");
+ switch (vsync)
+ {
+ case 1:
+ Client::setEnv("__GL_SYNC_TO_VBLANK", "0");
+ break;
+ case 2:
+ Client::setEnv("__GL_SYNC_TO_VBLANK", "1");
+ break;
+ default:
+ break;
+ }
+#endif
}
void Client::initGraphics()