diff options
author | Eugene Sandulenko | 2006-05-18 15:40:44 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-05-18 15:40:44 +0000 |
commit | e950d171f56a1d8ae9d41146284a506cd9d6e429 (patch) | |
tree | 44907f90ed9cf83221f6c6fd5fb2d564b4760de6 | |
parent | 6b90c405e833d92a388077a08158e144dc5848b9 (diff) | |
download | scummvm-rg350-e950d171f56a1d8ae9d41146284a506cd9d6e429.tar.gz scummvm-rg350-e950d171f56a1d8ae9d41146284a506cd9d6e429.tar.bz2 scummvm-rg350-e950d171f56a1d8ae9d41146284a506cd9d6e429.zip |
Properly set GFX mode selected in GUI. Fixes selection of 1x scaler.
svn-id: r22521
-rw-r--r-- | gui/options.cpp | 12 |
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); |