summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-03 16:45:58 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-03 20:01:51 +0300
commitc09113fe5d46feb56954fe6e43ef84a5001aa650 (patch)
treed5c9ddeb42ff81ef75b8d260ef7d93a6a9458f64
parenta6d5a835dd063bf98a7a1f2d32a173e2e07a8cbb (diff)
downloadmanaverse-c09113fe5d46feb56954fe6e43ef84a5001aa650.tar.gz
manaverse-c09113fe5d46feb56954fe6e43ef84a5001aa650.tar.bz2
manaverse-c09113fe5d46feb56954fe6e43ef84a5001aa650.tar.xz
manaverse-c09113fe5d46feb56954fe6e43ef84a5001aa650.zip
Disable video mode testing under Android.
Also disable fallback resolution 640x480 for Android.
-rw-r--r--src/client.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 878dd9360..5bc891948 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -528,7 +528,7 @@ void Client::gameInit()
}
#endif
-#ifdef USE_OPENGL
+#if defined(USE_OPENGL) && !defined(ANDROID)
if (!mOptions.safeMode && mOptions.test.empty()
&& !config.getBoolValue("videodetected"))
{
@@ -2115,8 +2115,13 @@ void Client::storeSafeParameters() const
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");
@@ -2131,8 +2136,13 @@ void Client::storeSafeParameters() const
{
// if video mode not configured reset only video mode to safe
config.setValue("opengl", 0);
+#ifdef ANDROID
+ config.setValue("screenwidth", 0);
+ config.setValue("screenheight", 0);
+#else
config.setValue("screenwidth", 640);
config.setValue("screenheight", 480);
+#endif
}
config.write();