Skip to content

Commit

Permalink
GUI: Add GUIO EGA Dithering option
Browse files Browse the repository at this point in the history
This will be used to disable the EGA dithering option
  • Loading branch information
Strangerke committed Oct 24, 2011
1 parent 9256652 commit 9912d7b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
5 changes: 3 additions & 2 deletions common/util.cpp
Expand Up @@ -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 }
};

Expand Down
3 changes: 2 additions & 1 deletion common/util.h
Expand Up @@ -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)
Expand Down
15 changes: 13 additions & 2 deletions gui/options.cpp
Expand Up @@ -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)) {

This comment has been minimized.

Copy link
@tsoliman

tsoliman Oct 26, 2011

Member

I think this should be enabled/visible from the launcher "Options" (i.e. the global domain) that way there's a master setting for all to inherit from.

Maybe something like this:

if (_guioptions.contains(GUIO_EGAUNDITHER) || _domain.equals(Common::ConfigManager::kApplicationDomain)) {

This is special because it is not a GUIO_NOFOO like the rest of them but a GUIO_YESFOO.

What do you think?

_disableDitheringCheckbox->setEnabled(true);
_disableDitheringCheckbox->setState(ConfMan.getBool("disable_dithering", _domain));
} else {
_disableDitheringCheckbox->setState(false);
_disableDitheringCheckbox->setEnabled(false);
}
}

// Audio options
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 9912d7b

Please sign in to comment.