aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorrsn88872019-08-18 16:59:50 -0500
committerrsn88872019-08-18 17:03:51 -0500
commitf14a7f15d5b1414cbebfdd6bad8f59803e0728b0 (patch)
tree8773f33efd59151a61df584ab28ce1b65c8bd4e3 /backends/platform/sdl
parent475eafc6c6fda083d7770d6bcde018f9ad1c77b3 (diff)
downloadscummvm-rg350-f14a7f15d5b1414cbebfdd6bad8f59803e0728b0.tar.gz
scummvm-rg350-f14a7f15d5b1414cbebfdd6bad8f59803e0728b0.tar.bz2
scummvm-rg350-f14a7f15d5b1414cbebfdd6bad8f59803e0728b0.zip
SWITCH: Force fullscreen always on
Windowed mode never worked correctly and is pointless since the Switch operating system doesn't have a window manager.
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/switch/switch.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/backends/platform/sdl/switch/switch.cpp b/backends/platform/sdl/switch/switch.cpp
index ab8427cf62..1a3c573608 100644
--- a/backends/platform/sdl/switch/switch.cpp
+++ b/backends/platform/sdl/switch/switch.cpp
@@ -53,12 +53,11 @@ void OSystem_Switch::initBackend() {
ConfMan.registerDefault("output_rate", 48000);
ConfMan.registerDefault("touchpad_mouse_mode", false);
+ ConfMan.setBool("fullscreen", true);
+
if (!ConfMan.hasKey("joystick_num")) {
ConfMan.setInt("joystick_num", 0);
}
- if (!ConfMan.hasKey("fullscreen")) {
- ConfMan.setBool("fullscreen", true);
- }
if (!ConfMan.hasKey("aspect_ratio")) {
ConfMan.setBool("aspect_ratio", false);
}
@@ -90,6 +89,8 @@ void OSystem_Switch::initBackend() {
}
bool OSystem_Switch::hasFeature(Feature f) {
+ if (f == kFeatureFullscreenMode)
+ return false;
return (f == kFeatureTouchpadMode ||
OSystem_SDL::hasFeature(f));
}
@@ -99,6 +100,8 @@ void OSystem_Switch::setFeatureState(Feature f, bool enable) {
case kFeatureTouchpadMode:
ConfMan.setBool("touchpad_mouse_mode", enable);
break;
+ case kFeatureFullscreenMode:
+ break;
default:
OSystem_SDL::setFeatureState(f, enable);
break;
@@ -110,6 +113,9 @@ bool OSystem_Switch::getFeatureState(Feature f) {
case kFeatureTouchpadMode:
return ConfMan.getBool("touchpad_mouse_mode");
break;
+ case kFeatureFullscreenMode:
+ return true;
+ break;
default:
return OSystem_SDL::getFeatureState(f);
break;