mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
SDL: Don't allow switching to and from fullscreen if it isn't supported
This commit is contained in:
committed by
Eugene Sandulenko
parent
470a1d3586
commit
205175c4e5
@@ -453,8 +453,6 @@ void DINGUXSdlGraphicsManager::setupHardwareSize() {
|
||||
|
||||
_videoMode.hardwareWidth = _videoMode.screenWidth / 2;
|
||||
_videoMode.hardwareHeight = _videoMode.screenHeight / 2;
|
||||
|
||||
_videoMode.fullscreen = true;
|
||||
} else {
|
||||
SurfaceSdlGraphicsManager::setupHardwareSize();
|
||||
}
|
||||
|
||||
@@ -422,9 +422,6 @@ void GPHGraphicsManager::hideOverlay() {
|
||||
}
|
||||
|
||||
void GPHGraphicsManager::setupHardwareSize() {
|
||||
// We don't offer anything other than fullscreen on GPH devices so let's not even pretend.
|
||||
_videoMode.fullscreen = true;
|
||||
|
||||
// Set the hardware stats to match the LCD.
|
||||
_videoMode.hardwareWidth = 320;
|
||||
_videoMode.hardwareHeight = 240;
|
||||
|
||||
@@ -53,7 +53,6 @@ bool OPGraphicsManager::loadGFXMode() {
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
SDL_SetCursor(hiddenCursor);
|
||||
|
||||
_videoMode.fullscreen = true;
|
||||
return SurfaceSdlGraphicsManager::loadGFXMode();
|
||||
}
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ bool SdlGraphicsManager::notifyEvent(const Common::Event &event) {
|
||||
}
|
||||
|
||||
void SdlGraphicsManager::toggleFullScreen() {
|
||||
if (!hasFeature(OSystem::kFeatureFullscreenMode))
|
||||
if (!g_system->hasFeature(OSystem::kFeatureFullscreenMode))
|
||||
return;
|
||||
|
||||
beginGFXTransaction();
|
||||
@@ -357,7 +357,7 @@ Common::Keymap *SdlGraphicsManager::getKeymap() {
|
||||
Keymap *keymap = new Keymap(Keymap::kKeymapTypeGlobal, "sdl-graphics", _("Graphics"));
|
||||
Action *act;
|
||||
|
||||
if (hasFeature(OSystem::kFeatureFullscreenMode)) {
|
||||
if (g_system->hasFeature(OSystem::kFeatureFullscreenMode)) {
|
||||
act = new Action("FULS", _("Toggle fullscreen"));
|
||||
act->addDefaultInputMapping("A+RETURN");
|
||||
act->addDefaultInputMapping("A+KP_ENTER");
|
||||
|
||||
@@ -194,12 +194,7 @@ SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSou
|
||||
#endif
|
||||
_scalerType = 0;
|
||||
|
||||
#ifndef __SYMBIAN32__
|
||||
_videoMode.fullscreen = ConfMan.getBool("fullscreen");
|
||||
#else
|
||||
_videoMode.fullscreen = true;
|
||||
#endif
|
||||
|
||||
_videoMode.filtering = ConfMan.getBool("filtering");
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
_videoMode.stretchMode = STRETCH_FIT;
|
||||
@@ -1494,6 +1489,9 @@ bool SurfaceSdlGraphicsManager::saveScreenshot(const Common::String &filename) c
|
||||
void SurfaceSdlGraphicsManager::setFullscreenMode(bool enable) {
|
||||
Common::StackLock lock(_graphicsMutex);
|
||||
|
||||
if (!g_system->hasFeature(OSystem::kFeatureFullscreenMode))
|
||||
return;
|
||||
|
||||
if (_oldVideoMode.setup && _oldVideoMode.fullscreen == enable)
|
||||
return;
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "backends/graphics/dinguxsdl/dinguxsdl-graphics.h"
|
||||
|
||||
void OSystem_SDL_Dingux::initBackend() {
|
||||
ConfMan.registerDefault("fullscreen", true);
|
||||
|
||||
// Create the events manager
|
||||
if (_eventSource == 0)
|
||||
_eventSource = new DINGUXSdlEventSource();
|
||||
|
||||
@@ -97,6 +97,7 @@ void OSystem_SDL_Symbian::initBackend() {
|
||||
// Symbian OS should have joystick_num set to 0 in the ini file,
|
||||
// but uiq devices might refuse opening the joystick
|
||||
ConfMan.setInt("joystick_num", 0);
|
||||
ConfMan.setBool("fullscreen", true);
|
||||
ConfMan.flushToDisk();
|
||||
|
||||
GUI::Actions::init();
|
||||
|
||||
Reference in New Issue
Block a user