From 11760509d762cb2652464a986000c777d2ff185e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 15 Nov 2012 01:41:33 +0300 Subject: Hide unsupported OpenGL renderers under Android. --- src/gui/setup_video.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/gui/setup_video.cpp') 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"), -- cgit v1.2.3-60-g2f50