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

aquadran aquadran at gmail.com
Fri Oct 16 18:17:37 UTC 2020


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:
bb388295a4 BACKENDS: drop setDefaultFeatureState() usage, it's not needed


Commit: bb388295a465ef2443a419bc399ae52e71c39df5
    https://github.com/scummvm/scummvm/commit/bb388295a465ef2443a419bc399ae52e71c39df5
Author: Paweł Kołodziejski (aquadran at users.sourceforge.net)
Date: 2020-10-16T20:17:29+02:00

Commit Message:
BACKENDS: drop setDefaultFeatureState() usage, it's not needed

Changed paths:
    backends/graphics3d/sdl/sdl-graphics3d.cpp
    backends/graphics3d/sdl/sdl-graphics3d.h
    backends/platform/sdl/sdl.cpp
    engines/engine.cpp


diff --git a/backends/graphics3d/sdl/sdl-graphics3d.cpp b/backends/graphics3d/sdl/sdl-graphics3d.cpp
index fc09af3f5c..03d0aa14bf 100644
--- a/backends/graphics3d/sdl/sdl-graphics3d.cpp
+++ b/backends/graphics3d/sdl/sdl-graphics3d.cpp
@@ -54,11 +54,6 @@ void SdlGraphics3dManager::deactivateManager() {
 	_eventSource->setGraphicsManager(0);
 }
 
-void SdlGraphics3dManager::setDefaultFeatureState() {
-	setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
-	setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio"));
-}
-
 void SdlGraphics3dManager::saveScreenshot() {
 	Common::String filename;
 
diff --git a/backends/graphics3d/sdl/sdl-graphics3d.h b/backends/graphics3d/sdl/sdl-graphics3d.h
index dbc4a999d5..46900cb503 100644
--- a/backends/graphics3d/sdl/sdl-graphics3d.h
+++ b/backends/graphics3d/sdl/sdl-graphics3d.h
@@ -118,11 +118,6 @@ public:
 		bool fullscreen;
 	};
 
-	/**
-	 * Gets the default feature state of the graphics manager.
-	 */
-	virtual void setDefaultFeatureState();
-
 	/** Obtain the user configured fullscreen resolution, or default to the desktop resolution */
 	virtual Common::Rect getPreferredFullscreenResolution();
 
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 9e30947b59..c2a34f9b09 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -791,9 +791,6 @@ bool OSystem_SDL::setGraphicsMode(int mode, uint flags) {
 				delete sdlGraphics3dManager;
 			}
 			_graphicsManager = sdlGraphics3dManager = new OpenGLSdlGraphics3dManager(_eventSource, _window, _capabilities);
-			// Setup feature defaults for 3D gfx while switching from 2D
-			if (sdlGraphicsManager)
-				sdlGraphics3dManager->setDefaultFeatureState();
 			switchedManager = true;
 		}
 #endif
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 4722d190d6..34438756d2 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -400,6 +400,7 @@ void initGraphics3d(int width, int height) {
 		g_system->setGraphicsMode(0, OSystem::kGfxModeRender3d);
 		g_system->initSize(width, height);
 		g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); // TODO: Replace this with initCommonGFX()
+		g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio")); // TODO: Replace this with initCommonGFX()
 	g_system->endGFXTransaction();
 }
 




More information about the Scummvm-git-logs mailing list