diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 24 | ||||
-rw-r--r-- | gui/options.h | 1 | ||||
-rw-r--r-- | gui/themes/default.inc | 6 | ||||
-rw-r--r-- | gui/themes/scummclassic.zip | bin | 126490 -> 126628 bytes | |||
-rw-r--r-- | gui/themes/scummclassic/classic_layout.stx | 3 | ||||
-rw-r--r-- | gui/themes/scummclassic/classic_layout_lowres.stx | 3 | ||||
-rw-r--r-- | gui/themes/scummmodern.zip | bin | 1646030 -> 1646168 bytes | |||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout.stx | 3 | ||||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout_lowres.stx | 3 |
9 files changed, 43 insertions, 0 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index 1f6683d388..4f8dbc20f9 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -135,6 +135,7 @@ void OptionsDialog::init() { _renderModePopUp = 0; _renderModePopUpDesc = 0; _fullscreenCheckbox = 0; + _filteringCheckbox = 0; _aspectCheckbox = 0; _enableAudioSettings = false; _midiTabId = 0; @@ -243,6 +244,12 @@ void OptionsDialog::open() { _fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain)); #endif // GUI_ONLY_FULLSCREEN + // Filtering setting + if (g_system->hasFeature(OSystem::kFeatureFilteringMode)) + _filteringCheckbox->setState(ConfMan.getBool("filtering", _domain)); + else + _filteringCheckbox->setVisible(false); + // Aspect ratio setting if (_guioptions.contains(GUIO_NOASPECT)) { _aspectCheckbox->setState(false); @@ -353,11 +360,14 @@ void OptionsDialog::close() { bool graphicsModeChanged = false; if (_fullscreenCheckbox) { if (_enableGraphicSettings) { + if (ConfMan.getBool("filtering", _domain) != _filteringCheckbox->getState()) + graphicsModeChanged = true; if (ConfMan.getBool("fullscreen", _domain) != _fullscreenCheckbox->getState()) graphicsModeChanged = true; if (ConfMan.getBool("aspect_ratio", _domain) != _aspectCheckbox->getState()) graphicsModeChanged = true; + ConfMan.setBool("filtering", _filteringCheckbox->getState(), _domain); ConfMan.setBool("fullscreen", _fullscreenCheckbox->getState(), _domain); ConfMan.setBool("aspect_ratio", _aspectCheckbox->getState(), _domain); @@ -384,6 +394,7 @@ void OptionsDialog::close() { ConfMan.set("render_mode", Common::getRenderModeCode((Common::RenderMode)_renderModePopUp->getSelectedTag()), _domain); } else { ConfMan.removeKey("fullscreen", _domain); + ConfMan.removeKey("filtering", _domain); ConfMan.removeKey("aspect_ratio", _domain); ConfMan.removeKey("gfx_mode", _domain); ConfMan.removeKey("render_mode", _domain); @@ -399,6 +410,9 @@ void OptionsDialog::close() { g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio", _domain)); if (ConfMan.hasKey("fullscreen")) g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen", _domain)); + if (ConfMan.hasKey("filtering")) + g_system->setFeatureState(OSystem::kFeatureFilteringMode, ConfMan.getBool("filtering", _domain)); + OSystem::TransactionError gfxError = g_system->endGFXTransaction(); // Since this might change the screen resolution we need to give @@ -441,6 +455,12 @@ void OptionsDialog::close() { message += "\n"; message += _("the fullscreen setting could not be changed"); } + + if (gfxError & OSystem::kTransactionFilteringFailed) { + ConfMan.setBool("filtering", g_system->getFeatureState(OSystem::kFeatureFilteringMode), _domain); + message += "\n"; + message += _("the filtering setting could not be changed"); + } // And display the error GUI::MessageDialog dialog(message); @@ -633,6 +653,7 @@ void OptionsDialog::setGraphicSettingsState(bool enabled) { _gfxPopUp->setEnabled(enabled); _renderModePopUpDesc->setEnabled(enabled); _renderModePopUp->setEnabled(enabled); + _filteringCheckbox->setEnabled(enabled); #ifndef GUI_ENABLE_KEYSDIALOG _fullscreenCheckbox->setEnabled(enabled); if (_guioptions.contains(GUIO_NOASPECT)) @@ -785,6 +806,9 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr // Fullscreen checkbox _fullscreenCheckbox = new CheckboxWidget(boss, prefix + "grFullscreenCheckbox", _("Fullscreen mode")); + + // Filtering checkbox + _filteringCheckbox = new CheckboxWidget(boss, prefix + "grFilteringCheckbox", _("Filter graphics"), _("Use linear filtering when scaling graphics")); // Aspect ratio checkbox _aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", _("Aspect ratio correction"), _("Correct aspect ratio for 320x200 games")); diff --git a/gui/options.h b/gui/options.h index 03dbdac492..802a503fd3 100644 --- a/gui/options.h +++ b/gui/options.h @@ -114,6 +114,7 @@ private: StaticTextWidget *_gfxPopUpDesc; PopUpWidget *_gfxPopUp; CheckboxWidget *_fullscreenCheckbox; + CheckboxWidget *_filteringCheckbox; CheckboxWidget *_aspectCheckbox; StaticTextWidget *_renderModePopUpDesc; PopUpWidget *_renderModePopUp; diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 07e596163d..8524a7728f 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -834,6 +834,9 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "<widget name='grFullscreenCheckbox' " "type='Checkbox' " "/>" +"<widget name='grFilteringCheckbox' " +"type='Checkbox' " +"/>" "</layout>" "</dialog>" "<dialog name='GlobalOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'>" @@ -2370,6 +2373,9 @@ const char *defaultXML1 = "<?xml version = '1.0'?>" "<widget name='grFullscreenCheckbox' " "type='Checkbox' " "/>" +"<widget name='grFilteringCheckbox' " +"type='Checkbox' " +"/>" "</layout>" "</dialog>" "<dialog name='GlobalOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'>" diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip Binary files differindex eb0ded5162..300e2ce087 100644 --- a/gui/themes/scummclassic.zip +++ b/gui/themes/scummclassic.zip diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index c67631ad22..ea5d3268c4 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -259,6 +259,9 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> + <widget name = 'grFilteringCheckbox' + type = 'Checkbox' + /> </layout> </dialog> diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx index 212ef7c451..7f43c7b1e1 100644 --- a/gui/themes/scummclassic/classic_layout_lowres.stx +++ b/gui/themes/scummclassic/classic_layout_lowres.stx @@ -257,6 +257,9 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> + <widget name = 'grFilteringCheckbox' + type = 'Checkbox' + /> </layout> </dialog> diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip Binary files differindex 0b8b771bf6..0968f06b40 100644 --- a/gui/themes/scummmodern.zip +++ b/gui/themes/scummmodern.zip diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index bb182c9dbb..a0a4e41f14 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -273,6 +273,9 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> + <widget name = 'grFilteringCheckbox' + type = 'Checkbox' + /> </layout> </dialog> diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx index 2ca89ce734..13ec698b85 100644 --- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx +++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx @@ -255,6 +255,9 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> + <widget name = 'grFilteringCheckbox' + type = 'Checkbox' + /> </layout> </dialog> |