summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-14 16:06:03 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-14 16:06:03 +0300
commit2f020391033422e7a580c6edcf9e4729d7690954 (patch)
tree5ef543bfede3daf66a1146f806678aac054ea111
parentca12866fa8e6f95d9efadab26952a58540eec939 (diff)
downloadmanaplus-2f020391033422e7a580c6edcf9e4729d7690954.tar.gz
manaplus-2f020391033422e7a580c6edcf9e4729d7690954.tar.bz2
manaplus-2f020391033422e7a580c6edcf9e4729d7690954.tar.xz
manaplus-2f020391033422e7a580c6edcf9e4729d7690954.zip
For safe mode in nacl reset only OpenGL mode.
-rw-r--r--src/configmanager.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/configmanager.cpp b/src/configmanager.cpp
index 9e21bbb1e..b5e80e5e9 100644
--- a/src/configmanager.cpp
+++ b/src/configmanager.cpp
@@ -163,7 +163,31 @@ void ConfigManager::backupConfig(const std::string &name)
Files::copyFile(fileName3, fileName4);
}
-#ifndef ANDROID
+#ifdef __native_client__
+void ConfigManager::storeSafeParameters()
+{
+ RenderType tmpOpengl;
+
+ isSafeMode = config.getBoolValue("safemode");
+ if (isSafeMode)
+ logger->log1("Run in safe mode");
+
+ tmpOpengl = intToRenderType(config.getIntValue("opengl"));
+
+ config.setValue("opengl", static_cast<int>(RENDER_SOFTWARE));
+
+ config.write();
+
+ if (settings.options.safeMode)
+ {
+ isSafeMode = true;
+ return;
+ }
+
+ config.setValue("safemode", false);
+ config.setValue("opengl", static_cast<int>(tmpOpengl));
+}
+#elif !defined(ANDROID)
void ConfigManager::storeSafeParameters()
{
bool tmpHwaccel;