summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-28 19:29:33 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-28 19:29:33 +0300
commitba0e3f4f83adb259822f21dc861919617a4422b4 (patch)
treef15c6b7a61a38c5501075cc023a84e03ad486d7a
parentf71059ffcaa499841a1d326747e05e8bd965fdf6 (diff)
downloadplus-ba0e3f4f83adb259822f21dc861919617a4422b4.tar.gz
plus-ba0e3f4f83adb259822f21dc861919617a4422b4.tar.bz2
plus-ba0e3f4f83adb259822f21dc861919617a4422b4.tar.xz
plus-ba0e3f4f83adb259822f21dc861919617a4422b4.zip
Fix vsync control for MESA drivers.
-rw-r--r--src/client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 1ec0c683d..af30e20b3 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -510,13 +510,17 @@ void Client::updateEnv()
#ifndef WIN32
const int vsync = config.getIntValue("vsync");
+ // __GL_SYNC_TO_VBLANK is nvidia variable.
+ // vblank_mode is MESA variable.
switch (vsync)
{
case 1:
Client::setEnv("__GL_SYNC_TO_VBLANK", "0");
+ Client::setEnv("vblank_mode", "0");
break;
case 2:
Client::setEnv("__GL_SYNC_TO_VBLANK", "1");
+ Client::setEnv("vblank_mode", "1");
break;
default:
break;