diff options
-rw-r--r-- | common/util.cpp | 5 | ||||
-rw-r--r-- | common/util.h | 3 | ||||
-rw-r--r-- | gui/options.cpp | 15 |
3 files changed, 18 insertions, 5 deletions
diff --git a/common/util.cpp b/common/util.cpp index 3fe3db43c9..1f77b42b32 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -338,8 +338,9 @@ const struct GameOpt { { GUIO_MIDIMT32, "midiMt32" }, { GUIO_MIDIGM, "midiGM" }, - { GUIO_NOASPECT, "noAspect" }, - + { GUIO_NOASPECT, "noAspect" }, + { GUIO_EGAUNDITHER, "egaUndither" }, + { GUIO_NONE, 0 } }; diff --git a/common/util.h b/common/util.h index 8059a3c5b2..f8d4c3b385 100644 --- a/common/util.h +++ b/common/util.h @@ -98,7 +98,8 @@ template<typename T> inline void SWAP(T &a, T &b) { T tmp = a; a = b; b = tmp; } #define GUIO_MIDIMT32 "\017" #define GUIO_MIDIGM "\020" -#define GUIO_NOASPECT "\021" +#define GUIO_NOASPECT "\021" +#define GUIO_EGAUNDITHER "\022" #define GUIO1(a) (a) #define GUIO2(a,b) (a b) diff --git a/gui/options.cpp b/gui/options.cpp index a2896cf921..8b4d9d183e 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -210,7 +210,15 @@ void OptionsDialog::open() { _aspectCheckbox->setState(ConfMan.getBool("aspect_ratio", _domain)); } #endif // SMALL_SCREEN_DEVICE - _disableDitheringCheckbox->setState(ConfMan.getBool("disable_dithering", _domain)); + + // EGA undithering setting + if (_guioptions.contains(GUIO_EGAUNDITHER)) { + _disableDitheringCheckbox->setEnabled(true); + _disableDitheringCheckbox->setState(ConfMan.getBool("disable_dithering", _domain)); + } else { + _disableDitheringCheckbox->setState(false); + _disableDitheringCheckbox->setEnabled(false); + } } // Audio options @@ -597,7 +605,10 @@ void OptionsDialog::setGraphicSettingsState(bool enabled) { else _aspectCheckbox->setEnabled(enabled); #endif - _disableDitheringCheckbox->setEnabled(enabled); + if (_guioptions.contains(GUIO_EGAUNDITHER)) + _disableDitheringCheckbox->setEnabled(true); + else + _disableDitheringCheckbox->setEnabled(false); } void OptionsDialog::setAudioSettingsState(bool enabled) { |