[Scummvm-git-logs] scummvm master -> ea9e33bd1096389f8f11614d080d16f0005b1e10

bluegr bluegr at gmail.com
Sun Aug 18 05:21:31 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ea9e33bd10 GUI: Check if fullscreen is available at runtime


Commit: ea9e33bd1096389f8f11614d080d16f0005b1e10
    https://github.com/scummvm/scummvm/commit/ea9e33bd1096389f8f11614d080d16f0005b1e10
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2019-08-18T06:21:28+03:00

Commit Message:
GUI: Check if fullscreen is available at runtime

Changed paths:
    backends/graphics/sdl/sdl-graphics.cpp
    backends/graphics/symbiansdl/symbiansdl-graphics.cpp
    backends/platform/symbian/src/portdefs.h
    backends/platform/wince/portdefs.h
    configure
    gui/options.cpp


diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index a9902cf..453c60c 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -343,6 +343,9 @@ bool SdlGraphicsManager::notifyEvent(const Common::Event &event) {
 }
 
 void SdlGraphicsManager::toggleFullScreen() {
+	if (!hasFeature(OSystem::kFeatureFullscreenMode))
+		return;
+
 	beginGFXTransaction();
 	setFeatureState(OSystem::kFeatureFullscreenMode, !getFeatureState(OSystem::kFeatureFullscreenMode));
 	endGFXTransaction();
diff --git a/backends/graphics/symbiansdl/symbiansdl-graphics.cpp b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
index 6458fcf..ca79a61 100644
--- a/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
+++ b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
@@ -33,7 +33,6 @@ SymbianSdlGraphicsManager::SymbianSdlGraphicsManager(SdlEventSource *sdlEventSou
 
 bool SymbianSdlGraphicsManager::hasFeature(OSystem::Feature f) const {
 	switch (f) {
-	case OSystem::kFeatureFullscreenMode:
 	case OSystem::kFeatureAspectRatioCorrection:
 	case OSystem::kFeatureCursorPalette:
 		return true;
diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h
index 93dd4fa..598dfab 100644
--- a/backends/platform/symbian/src/portdefs.h
+++ b/backends/platform/symbian/src/portdefs.h
@@ -84,7 +84,6 @@ namespace std
 #undef remove
 #endif
 
-#define GUI_ONLY_FULLSCREEN
 #define GUI_ENABLE_KEYSDIALOG
 
 #define DISABLE_COMMAND_LINE
diff --git a/backends/platform/wince/portdefs.h b/backends/platform/wince/portdefs.h
index 2283f94..5c24b4b 100644
--- a/backends/platform/wince/portdefs.h
+++ b/backends/platform/wince/portdefs.h
@@ -30,7 +30,6 @@
 // Missing string/stdlib/assert declarations for WinCE 2.xx
 #if _WIN32_WCE < 300
 
-	#define GUI_ONLY_FULLSCREEN
 	#define GUI_ENABLE_KEYSDIALOG
 
 	void *calloc(size_t n, size_t s);
diff --git a/configure b/configure
index 8b70ad5..90adb94 100755
--- a/configure
+++ b/configure
@@ -3180,7 +3180,7 @@ if test -n "$_host"; then
 		gcw0)
 			_sysroot=`$CXX --print-sysroot`
 			_sdlpath=$_sysroot/usr/bin
-			append_var DEFINES "-DDINGUX -DGCW0 -DGUI_ONLY_FULLSCREEN"
+			append_var DEFINES "-DDINGUX -DGCW0"
 			append_var DEFINES "-DREDUCE_MEMORY_USAGE"
 			append_var CXXFLAGS "-mips32"
 			_backend="dingux"
@@ -3421,7 +3421,6 @@ if test -n "$_host"; then
 			_port_mk="backends/platform/sdl/psp2/psp2.mk"
 			;;
 		psp)
-			append_var DEFINES "-DGUI_ONLY_FULLSCREEN"
 			_backend="psp"
 			_build_scalers=no
 			_mt32emu=no
diff --git a/gui/options.cpp b/gui/options.cpp
index 3b78545..9243862 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) {





More information about the Scummvm-git-logs mailing list