aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/options.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 1db3100081..0c1d36f580 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -242,8 +242,16 @@ void OptionsDialog::close() {
ConfMan.setBool("fullscreen", _fullscreenCheckbox->getState(), _domain);
ConfMan.setBool("aspect_ratio", _aspectCheckbox->getState(), _domain);
- if ((int32)_gfxPopUp->getSelectedTag() >= 0)
- ConfMan.set("gfx_mode", _gfxPopUp->getSelectedString(), _domain);
+ if ((int32)_gfxPopUp->getSelectedTag() >= 0) {
+ const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
+
+ while (gm->name) {
+ if (gm->id == (int)_gfxPopUp->getSelectedTag()) {
+ ConfMan.set("gfx_mode", gm->name, _domain);
+ break;
+ }
+ }
+ }
if ((int32)_renderModePopUp->getSelectedTag() >= 0)
ConfMan.set("render_mode", Common::getRenderModeCode((Common::RenderMode)_renderModePopUp->getSelectedTag()), _domain);