From 2f020391033422e7a580c6edcf9e4729d7690954 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 14 Jan 2016 16:06:03 +0300 Subject: For safe mode in nacl reset only OpenGL mode. --- src/configmanager.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src') 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(RENDER_SOFTWARE)); + + config.write(); + + if (settings.options.safeMode) + { + isSafeMode = true; + return; + } + + config.setValue("safemode", false); + config.setValue("opengl", static_cast(tmpOpengl)); +} +#elif !defined(ANDROID) void ConfigManager::storeSafeParameters() { bool tmpHwaccel; -- cgit v1.2.3-70-g09d2