summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-25 20:32:12 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-25 20:32:12 +0300
commit136a97e5cc3499077af7b37ba6cc6a5a00f52e75 (patch)
tree3b4bd6e67d8fe6b32be986d2bd01b58c94fa9ca7 /src/utils
parent190d4073c1c2345cc96cece3099a5e58b434ebb7 (diff)
downloadmanaverse-136a97e5cc3499077af7b37ba6cc6a5a00f52e75.tar.gz
manaverse-136a97e5cc3499077af7b37ba6cc6a5a00f52e75.tar.bz2
manaverse-136a97e5cc3499077af7b37ba6cc6a5a00f52e75.tar.xz
manaverse-136a97e5cc3499077af7b37ba6cc6a5a00f52e75.zip
allow use only first video mode on Android.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/sdlhelper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils/sdlhelper.cpp b/src/utils/sdlhelper.cpp
index 0034ee0e8..da81f03ea 100644
--- a/src/utils/sdlhelper.cpp
+++ b/src/utils/sdlhelper.cpp
@@ -37,6 +37,13 @@ bool SDL::getAllVideoModes(StringVect &modeList)
SDL_Rect *const *const modes = SDL_ListModes(nullptr,
SDL_FULLSCREEN | SDL_HWSURFACE);
+#ifdef ANDROID
+ const std::string modeString =
+ toString(static_cast<int>(modes[0]->w)).append("x")
+ .append(toString(static_cast<int>(modes[0]->h)));
+ logger->log("support mode: " + modeString);
+ modeList.push_back(modeString);
+#else
/* Check which modes are available */
if (modes == static_cast<SDL_Rect **>(nullptr))
{
@@ -60,6 +67,7 @@ bool SDL::getAllVideoModes(StringVect &modeList)
}
return true;
}
+#endif
}
void SDL::SetWindowTitle(const SDL_Surface *const window A_UNUSED,