From 1a948b6772f440cda14f7cd526bd6e1555251d61 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 22 Oct 2013 23:07:56 +0300 Subject: disable safe mode in Android. --- src/client.cpp | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/client.cpp b/src/client.cpp index 01c114aff..a35a671f1 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -376,7 +376,9 @@ void Client::gameInit() config.incValue("runcount"); +#ifndef ANDROID storeSafeParameters(); +#endif const ResourceManager *const resman = ResourceManager::getInstance(); if (!resman->setWriteDir(mLocalDataDir)) @@ -2348,24 +2350,11 @@ void Client::storeSafeParameters() const { // if video mode configured reset most settings to safe config.setValue("hwaccel", false); - -#if defined(ANDROID) - config.setValue("opengl", static_cast(RENDER_GLES_OPENGL)); -#elif defined(__APPLE__) - config.setValue("opengl", static_cast(RENDER_NORMAL_OPENGL)); -#else - config.setValue("opengl", static_cast(RENDER_SOFTWARE)); -#endif config.setValue("altfpslimit", 3); config.setValue("sound", false); config.setValue("safemode", true); -#ifdef ANDROID - config.setValue("screenwidth", 0); - config.setValue("screenheight", 0); -#else config.setValue("screenwidth", 640); config.setValue("screenheight", 480); -#endif config.setValue("font", "fonts/dejavusans.ttf"); config.setValue("boldFont", "fonts/dejavusans-bold.ttf"); config.setValue("particleFont", "fonts/dejavusans.ttf"); @@ -2379,16 +2368,14 @@ void Client::storeSafeParameters() const else { // if video mode not configured reset only video mode to safe -#ifdef ANDROID - config.setValue("screenwidth", 0); - config.setValue("screenheight", 0); - config.setValue("opengl", static_cast(RENDER_GLES_OPENGL)); -#else config.setValue("screenwidth", 640); config.setValue("screenheight", 480); - config.setValue("opengl", static_cast(RENDER_SOFTWARE)); -#endif } +#if defined(__APPLE__) + config.setValue("opengl", static_cast(RENDER_NORMAL_OPENGL)); +#else + config.setValue("opengl", static_cast(RENDER_SOFTWARE)); +#endif config.write(); -- cgit v1.2.3-60-g2f50