diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-11-15 01:41:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-11-15 01:41:33 +0300 |
commit | 11760509d762cb2652464a986000c777d2ff185e (patch) | |
tree | 62b3148047148a3d192efa00f14f935670a5e06b /src | |
parent | f5a8beab7116d7ac33dc5f506dba9a0f5913b440 (diff) | |
download | manaplus-11760509d762cb2652464a986000c777d2ff185e.tar.gz manaplus-11760509d762cb2652464a986000c777d2ff185e.tar.bz2 manaplus-11760509d762cb2652464a986000c777d2ff185e.tar.xz manaplus-11760509d762cb2652464a986000c777d2ff185e.zip |
Hide unsupported OpenGL renderers under Android.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/setup_video.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index d80b3ceb6..37e09645c 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -178,8 +178,10 @@ int ModeListModel::getIndexOf(const std::string &widthXHeightMode) const char *OPENGL_NAME[4] = { N_("Software"), +#ifndef ANDROID N_("Fast OpenGL"), N_("Safe OpenGL"), +#endif N_("Mobile OpenGL"), }; @@ -190,7 +192,11 @@ public: { } virtual int getNumberOfElements() +#ifdef ANDROID + { return 2; } +#else { return 4; } +#endif virtual std::string getElementAt(int i) { @@ -392,7 +398,12 @@ void Setup_Video::apply() // OpenGL change if (mOpenGLDropDown->getSelected() != mOpenGLEnabled) { - config.setValue("opengl", mOpenGLDropDown->getSelected()); + int mode = mOpenGLDropDown->getSelected(); +#ifdef ANDROID + if (mode == 1 || mode == 2) + mode = 3; +#endif + config.setValue("opengl", mode); // OpenGL can currently only be changed by restarting, notify user. new OkDialog(_("Changing to OpenGL"), |