aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
authorCameron Cawley2019-08-17 12:48:29 +0100
committerFilippos Karapetis2019-08-18 06:21:28 +0300
commitea9e33bd1096389f8f11614d080d16f0005b1e10 (patch)
treeb05caa95a6662805bb07b243807c4468d3a0659b /gui/options.cpp
parent1083ff65777867620f28b519bce4ab0d2edda7f1 (diff)
downloadscummvm-rg350-ea9e33bd1096389f8f11614d080d16f0005b1e10.tar.gz
scummvm-rg350-ea9e33bd1096389f8f11614d080d16f0005b1e10.tar.bz2
scummvm-rg350-ea9e33bd1096389f8f11614d080d16f0005b1e10.zip
GUI: Check if fullscreen is available at runtime
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 3b78545303..92438623ac 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -311,13 +311,13 @@ void OptionsDialog::build() {
_stretchPopUp->setVisible(false);
}
-#ifdef GUI_ONLY_FULLSCREEN
- _fullscreenCheckbox->setState(true);
- _fullscreenCheckbox->setEnabled(false);
-#else // !GUI_ONLY_FULLSCREEN
// Fullscreen setting
- _fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain));
-#endif // GUI_ONLY_FULLSCREEN
+ if (g_system->hasFeature(OSystem::kFeatureFullscreenMode)) {
+ _fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain));
+ } else {
+ _fullscreenCheckbox->setState(true);
+ _fullscreenCheckbox->setEnabled(false);
+ }
// Filtering setting
if (g_system->hasFeature(OSystem::kFeatureFilteringMode))
@@ -870,15 +870,16 @@ void OptionsDialog::setGraphicSettingsState(bool enabled) {
_stretchPopUpDesc->setEnabled(enabled);
_stretchPopUp->setEnabled(enabled);
_filteringCheckbox->setEnabled(enabled);
-#ifndef GUI_ENABLE_KEYSDIALOG
-#ifndef GUI_ONLY_FULLSCREEN
- _fullscreenCheckbox->setEnabled(enabled);
-#endif // !GUI_ONLY_FULLSCREEN
+
+ if (g_system->hasFeature(OSystem::kFeatureFullscreenMode))
+ _fullscreenCheckbox->setEnabled(enabled);
+ else
+ _fullscreenCheckbox->setEnabled(false);
+
if (_guioptions.contains(GUIO_NOASPECT))
_aspectCheckbox->setEnabled(false);
else
_aspectCheckbox->setEnabled(enabled);
-#endif // !GUI_ENABLE_KEYSDIALOG
}
void OptionsDialog::setAudioSettingsState(bool enabled) {