aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2012-03-17 03:51:27 -0700
committerEugene Sandulenko2012-03-17 03:51:27 -0700
commit34198fda35cc3daf848ded9ddf6d64949ed36f39 (patch)
tree7268ce152f9ce3440c5b3039b414559a4cc4dcac /gui
parent56252909f5bebfa9cfd43cf092effb0111fdabef (diff)
parentc0d54bdd8dcd2235a0258af145fe2528c07c9fc2 (diff)
downloadscummvm-rg350-34198fda35cc3daf848ded9ddf6d64949ed36f39.tar.gz
scummvm-rg350-34198fda35cc3daf848ded9ddf6d64949ed36f39.tar.bz2
scummvm-rg350-34198fda35cc3daf848ded9ddf6d64949ed36f39.zip
Merge pull request #203 from fingolfin/guio-cleanup
COMMON: GuiOptions cleanup
Diffstat (limited to 'gui')
-rw-r--r--gui/options.cpp29
-rw-r--r--gui/options.h2
2 files changed, 2 insertions, 29 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 3a16bddd7c..6747195a1b 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -750,7 +750,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
}
// RenderMode popup
- const Common::String allFlags = renderType2GUIO((uint32)-1);
+ const Common::String allFlags = Common::allRenderModesGUIOs();
bool renderingTypeDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != NULL);
_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", _("Render mode:"), _("Special dithering modes supported by some games"));
@@ -759,7 +759,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
_renderModePopUp->appendEntry("");
const Common::RenderModeDescription *rm = Common::g_renderModes;
for (; rm->code; ++rm) {
- Common::String renderGuiOption = renderType2GUIO(rm->id);
+ Common::String renderGuiOption = Common::renderMode2GUIO(rm->id);
if ((_domain == Common::ConfigManager::kApplicationDomain) || (_domain != Common::ConfigManager::kApplicationDomain && !renderingTypeDefined) || (_guioptions.contains(renderGuiOption)))
_renderModePopUp->appendEntry(_c(rm->description, context), rm->id);
}
@@ -1040,31 +1040,6 @@ void OptionsDialog::saveMusicDeviceSetting(PopUpWidget *popup, Common::String se
ConfMan.removeKey(setting, _domain);
}
-Common::String OptionsDialog::renderType2GUIO(uint32 renderType) {
- static const struct {
- Common::RenderMode type;
- const char *guio;
- } renderGUIOMapping[] = {
- { Common::kRenderHercG, GUIO_RENDERHERCGREEN },
- { Common::kRenderHercA, GUIO_RENDERHERCAMBER },
- { Common::kRenderCGA, GUIO_RENDERCGA },
- { Common::kRenderEGA, GUIO_RENDEREGA },
- { Common::kRenderVGA, GUIO_RENDERVGA },
- { Common::kRenderAmiga, GUIO_RENDERAMIGA },
- { Common::kRenderFMTowns, GUIO_RENDERFMTOWNS },
- { Common::kRenderPC9821, GUIO_RENDERPC9821 },
- { Common::kRenderPC9801, GUIO_RENDERPC9801 }
- };
- Common::String res;
-
- for (int i = 0; i < ARRAYSIZE(renderGUIOMapping); i++) {
- if (renderType == renderGUIOMapping[i].type || renderType == (uint32)-1)
- res += renderGUIOMapping[i].guio;
- }
-
- return res;
-}
-
int OptionsDialog::getSubtitleMode(bool subtitles, bool speech_mute) {
if (_guioptions.contains(GUIO_NOSUBTITLES))
return kSubtitlesSpeech; // Speech only
diff --git a/gui/options.h b/gui/options.h
index 83c9d60d59..05b3cac617 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -85,8 +85,6 @@ protected:
bool loadMusicDeviceSetting(PopUpWidget *popup, Common::String setting, MusicType preferredType = MT_AUTO);
void saveMusicDeviceSetting(PopUpWidget *popup, Common::String setting);
- Common::String renderType2GUIO(uint32 renderType);
-
TabWidget *_tabWidget;
int _graphicsTabId;
int _midiTabId;