summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-21 21:13:31 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-01 22:58:18 +0300
commit04916c1b451e4400a496ae210b3faa10154c65ac (patch)
treefe7414434dcb6bcc1405b0d608d82348bc3ca466 /src/client.cpp
parentd48e360ea40536e9f3e7fb4ce381b7fdc2ee5954 (diff)
downloadplus-04916c1b451e4400a496ae210b3faa10154c65ac.tar.gz
plus-04916c1b451e4400a496ae210b3faa10154c65ac.tar.bz2
plus-04916c1b451e4400a496ae210b3faa10154c65ac.tar.xz
plus-04916c1b451e4400a496ae210b3faa10154c65ac.zip
Add batch drawing for any images.
Add this drawing to Button.
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