summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-24 13:57:27 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:17 +0300
commited77e8fb99e16e72cde0e163a9b58c5cefd8d05d (patch)
tree42688472bb292ff287b1829826d0b873a21b96d6 /src/client.cpp
parent2652836af364935294a2c731de74502de530f9e6 (diff)
downloadplus-ed77e8fb99e16e72cde0e163a9b58c5cefd8d05d.tar.gz
plus-ed77e8fb99e16e72cde0e163a9b58c5cefd8d05d.tar.bz2
plus-ed77e8fb99e16e72cde0e163a9b58c5cefd8d05d.tar.xz
plus-ed77e8fb99e16e72cde0e163a9b58c5cefd8d05d.zip
move some function to sdl helper.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/client.cpp b/src/client.cpp
index f7fd72094..b191e443d 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2824,12 +2824,8 @@ void Client::applyGamma()
if (config.getFloatValue("enableGamma"))
{
const float val = config.getFloatValue("gamma");
-#ifdef USE_SDL2
- if (mainGraphics)
- SDL_SetWindowBrightness(mainGraphics->getWindow(), val);
-#else
- SDL_SetGamma(val, val, val);
-#endif
+ SDL::setGamma(mainGraphics->getWindow(),
+ config.getFloatValue("gamma"));
}
}
@@ -2837,11 +2833,7 @@ void Client::applyVSync()
{
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
+ SDL::setVsync(val);
}
void Client::applyKeyRepeat()