summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
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
}