summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-22 11:35:54 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:15 +0300
commit07390a4c8dcde85602c1a91d3773061d67d169ab (patch)
tree2128313bf3f5612d036cc35d71b2867b276b54e2 /src/client.cpp
parent89f6264172de327a53db26cdc15b475ca3c7e62e (diff)
downloadmv-07390a4c8dcde85602c1a91d3773061d67d169ab.tar.gz
mv-07390a4c8dcde85602c1a91d3773061d67d169ab.tar.bz2
mv-07390a4c8dcde85602c1a91d3773061d67d169ab.tar.xz
mv-07390a4c8dcde85602c1a91d3773061d67d169ab.zip
add some more fixes for SDL2 compilation.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 29d81ad64..7c04e807e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2906,7 +2906,7 @@ void Client::applyGamma()
{
const float val = config.getFloatValue("gamma");
#ifdef USE_SDL2
- // +++ need use SDL_SetWindowBrightness
+ SDL_SetWindowBrightness(mWindow, val);
#else
SDL_SetGamma(val, val, val);
#endif
@@ -2915,9 +2915,11 @@ void Client::applyGamma()
void Client::applyVSync()
{
-#ifndef USE_SDL2
const int val = config.getIntValue("vsync");
if (val > 0 && val < 2)
+#ifdef USE_SDL2
+ SDL_GL_SetSwapInterval(val);
+#else
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, val);
#endif
}