diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-01 14:41:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-01 14:53:49 +0300 |
commit | 222748a7e0c79225c66485898b913aa60f56cfe2 (patch) | |
tree | 38e27f08cec39bf8cca26df8caade81c112245e8 /src/client.cpp | |
parent | f4df2a0fd2d9c01b6f756c4b00ed9848f319a1b0 (diff) | |
download | manaplus-222748a7e0c79225c66485898b913aa60f56cfe2.tar.gz manaplus-222748a7e0c79225c66485898b913aa60f56cfe2.tar.bz2 manaplus-222748a7e0c79225c66485898b913aa60f56cfe2.tar.xz manaplus-222748a7e0c79225c66485898b913aa60f56cfe2.zip |
add way to map render mode selection to actual modes.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client.cpp b/src/client.cpp index 1dcdcfec3..fef14b6e6 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -169,7 +169,7 @@ UserPalette *userPalette = nullptr; Graphics *mainGraphics = nullptr; SoundManager soundManager; -int openGLMode = 0; +RenderType openGLMode = RENDER_SOFTWARE; static uint32_t nextTick(uint32_t interval, void *param A_UNUSED); static uint32_t nextSecond(uint32_t interval, void *param A_UNUSED); @@ -573,14 +573,14 @@ void Client::gameInit() #endif #ifdef USE_OPENGL - openGLMode = config.getIntValue("opengl"); + openGLMode = intToRenderType(config.getIntValue("opengl")); OpenGLImageHelper::setBlur(config.getBoolValue("blur")); SurfaceImageHelper::SDLSetEnableAlphaCache( config.getBoolValue("alphaCache") && !openGLMode); ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f || openGLMode); #else - openGLMode = 0; + openGLMode = RENDER_SOFTWARE; SurfaceImageHelper::SDLSetEnableAlphaCache( config.getBoolValue("alphaCache")); ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f); @@ -2339,7 +2339,7 @@ void Client::accountLogin(LoginData *const data) const void Client::storeSafeParameters() const { bool tmpHwaccel; - int tmpOpengl; + RenderType tmpOpengl; int tmpFpslimit; int tmpAltFpslimit; bool tmpSound; @@ -2360,7 +2360,7 @@ void Client::storeSafeParameters() const logger->log1("Run in safe mode"); #if defined USE_OPENGL - tmpOpengl = config.getIntValue("opengl"); + tmpOpengl = intToRenderType(config.getIntValue("opengl")); #else tmpOpengl = 0; #endif @@ -2440,7 +2440,7 @@ void Client::storeSafeParameters() const if (!tmpOpengl) { config.setValue("hwaccel", tmpHwaccel); - config.setValue("opengl", tmpOpengl); + config.setValue("opengl", static_cast<int>(tmpOpengl)); config.setValue("fpslimit", tmpFpslimit); config.setValue("altfpslimit", tmpAltFpslimit); config.setValue("sound", tmpSound); @@ -2459,7 +2459,7 @@ void Client::storeSafeParameters() const } else { - config.setValue("opengl", tmpOpengl); + config.setValue("opengl", static_cast<int>(tmpOpengl)); config.setValue("screenwidth", width); config.setValue("screenheight", height); } |