summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 0ec0647cb..6ea0ad11f 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -147,6 +147,7 @@ UserPalette *userPalette = nullptr;
Graphics *mainGraphics = nullptr;
Sound sound;
+int openGLMode = 0;
static uint32_t nextTick(uint32_t interval, void *param A_UNUSED);
static uint32_t nextSecond(uint32_t interval, void *param A_UNUSED);
@@ -538,12 +539,14 @@ void Client::gameInit()
#endif
#ifdef USE_OPENGL
+ openGLMode = config.getIntValue("opengl");
OpenGLImageHelper::setBlur(config.getBoolValue("blur"));
SDLImageHelper::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache")
- && !config.getIntValue("opengl"));
+ && !openGLMode);
ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f
- || config.getIntValue("opengl"));
+ || openGLMode);
#else
+ openGLMode = 0;
SDLImageHelper::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache"));
ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f);
#endif