aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2011-10-24 16:51:18 +0200
committerStrangerke2011-10-24 16:51:18 +0200
commit9912d7b85699d9a0b273d7c8b870d3db8bf8438a (patch)
tree9778c6b8688ddb7f63a73836bde4c7c48db6bc2e
parent9256652fcf2762f3f6efd2eded66321150312e9a (diff)
downloadscummvm-rg350-9912d7b85699d9a0b273d7c8b870d3db8bf8438a.tar.gz
scummvm-rg350-9912d7b85699d9a0b273d7c8b870d3db8bf8438a.tar.bz2
scummvm-rg350-9912d7b85699d9a0b273d7c8b870d3db8bf8438a.zip
GUI: Add GUIO EGA Dithering option
This will be used to disable the EGA dithering option
-rw-r--r--common/util.cpp5
-rw-r--r--common/util.h3
-rw-r--r--gui/options.cpp15
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) {