diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-22 11:35:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:15 +0300 |
commit | 07390a4c8dcde85602c1a91d3773061d67d169ab (patch) | |
tree | 2128313bf3f5612d036cc35d71b2867b276b54e2 /src/client.cpp | |
parent | 89f6264172de327a53db26cdc15b475ca3c7e62e (diff) | |
download | manaplus-07390a4c8dcde85602c1a91d3773061d67d169ab.tar.gz manaplus-07390a4c8dcde85602c1a91d3773061d67d169ab.tar.bz2 manaplus-07390a4c8dcde85602c1a91d3773061d67d169ab.tar.xz manaplus-07390a4c8dcde85602c1a91d3773061d67d169ab.zip |
add some more fixes for SDL2 compilation.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 6 |
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 } |