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

criezy criezy at scummvm.org
Thu Nov 12 21:05:41 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:
a509afdf4d COMMON: Remove resetGraphicsScale from OSystem


Commit: a509afdf4da3ba0268973cca229e3e378bc72603
    https://github.com/scummvm/scummvm/commit/a509afdf4da3ba0268973cca229e3e378bc72603
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-11-12T21:05:36Z

Commit Message:
COMMON: Remove resetGraphicsScale from OSystem

This function used to be called from the Engine class, but was
not longer used since commit 432fd522. The single remaining use
was an internal use in the SurfaceSdlGraphicsManager, and I kept
the behaviour there while removing the function.

Changed paths:
    backends/graphics/graphics.h
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.h
    backends/modular-backend.cpp
    backends/modular-backend.h
    backends/platform/android3d/graphics.cpp
    backends/platform/android3d/graphics.h
    common/system.h


diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h
index a548e201da..2473ba4a65 100644
--- a/backends/graphics/graphics.h
+++ b/backends/graphics/graphics.h
@@ -48,7 +48,6 @@ public:
 	};
 	virtual int getDefaultGraphicsMode() const { return 0; }
 	virtual bool setGraphicsMode(int mode, uint flags = OSystem::kGfxModeNoFlags) { return (mode == 0); }
-	virtual void resetGraphicsScale() {}
 	virtual int getGraphicsMode() const { return 0; }
 	virtual const OSystem::GraphicsMode *getSupportedShaders() const {
 		static const OSystem::GraphicsMode no_shader[2] = {{"NONE", "Normal (no shader)", 0}, {0, 0, 0}};
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 746f801ab0..c4c9ed21e1 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -285,10 +285,6 @@ int SurfaceSdlGraphicsManager::getDefaultGraphicsMode() const {
 #endif
 }
 
-void SurfaceSdlGraphicsManager::resetGraphicsScale() {
-	setGraphicsMode(s_gfxModeSwitchTable[_scalerType][0]);
-}
-
 void SurfaceSdlGraphicsManager::beginGFXTransaction() {
 	assert(_transactionMode == kTransactionNone);
 
@@ -811,7 +807,7 @@ void SurfaceSdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFo
 	if ((int)w != _videoMode.screenWidth || (int)h != _videoMode.screenHeight) {
 		const bool useDefault = defaultGraphicsModeConfig();
 		if (useDefault && w > 320) {
-			resetGraphicsScale();
+			setGraphicsMode(s_gfxModeSwitchTable[_scalerType][0]);
 		} else {
 			setGraphicsMode(getGraphicsModeIdByName(ConfMan.get("gfx_mode")));
 		}
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index e8df62c0c6..7172a6080e 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -83,7 +83,6 @@ public:
 	virtual int getDefaultGraphicsMode() const override;
 	virtual bool setGraphicsMode(int mode, uint flags = OSystem::kGfxModeNoFlags) override;
 	virtual int getGraphicsMode() const override;
-	virtual void resetGraphicsScale() override;
 #ifdef USE_RGB_COLOR
 	virtual Graphics::PixelFormat getScreenFormat() const override { return _screenFormat; }
 	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const override;
diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp
index 77b018ec05..c7f4355e78 100644
--- a/backends/modular-backend.cpp
+++ b/backends/modular-backend.cpp
@@ -109,10 +109,6 @@ int ModularGraphicsBackend::getStretchMode() const {
 	return _graphicsManager->getStretchMode();
 }
 
-void ModularGraphicsBackend::resetGraphicsScale() {
-	_graphicsManager->resetGraphicsScale();
-}
-
 #ifdef USE_RGB_COLOR
 
 Graphics::PixelFormat ModularGraphicsBackend::getScreenFormat() const {
diff --git a/backends/modular-backend.h b/backends/modular-backend.h
index bac5cf6321..fd914dde57 100644
--- a/backends/modular-backend.h
+++ b/backends/modular-backend.h
@@ -76,7 +76,6 @@ public:
 	virtual int getDefaultStretchMode() const override final;
 	virtual bool setStretchMode(int mode) override final;
 	virtual int getStretchMode() const override final;
-	virtual void resetGraphicsScale() override final;
 #ifdef USE_RGB_COLOR
 	virtual Graphics::PixelFormat getScreenFormat() const override final;
 	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const override final;
diff --git a/backends/platform/android3d/graphics.cpp b/backends/platform/android3d/graphics.cpp
index 1424ee1c5b..deb9cef9ab 100644
--- a/backends/platform/android3d/graphics.cpp
+++ b/backends/platform/android3d/graphics.cpp
@@ -252,9 +252,6 @@ bool AndroidGraphicsManager::setGraphicsMode(int mode, uint flags) {
 	return true;
 }
 
-void AndroidGraphicsManager::resetGraphicsScale() {
-}
-
 int AndroidGraphicsManager::getGraphicsMode() const {
 	return _graphicsMode;
 }
diff --git a/backends/platform/android3d/graphics.h b/backends/platform/android3d/graphics.h
index 5f2984e7d1..461558b88b 100644
--- a/backends/platform/android3d/graphics.h
+++ b/backends/platform/android3d/graphics.h
@@ -48,7 +48,6 @@ public:
 	virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
 	virtual int getDefaultGraphicsMode() const override;
 	virtual bool setGraphicsMode(int mode, uint flags = OSystem::kGfxModeNoFlags) override;
-	virtual void resetGraphicsScale() override;
 	virtual int getGraphicsMode() const override;
 
 	virtual bool hasFeature(OSystem::Feature f) const override;
diff --git a/common/system.h b/common/system.h
index 594eee9291..8181116f18 100644
--- a/common/system.h
+++ b/common/system.h
@@ -637,13 +637,6 @@ public:
 	 */
 	virtual int getGraphicsMode() const { return 0; }
 
-	/**
-	 * Sets the graphics scale factor to x1. Games with large screen sizes
-	 * reset the scale to x1 so the screen will not be too big when starting
-	 * the game.
-	 */
-	virtual void resetGraphicsScale() {}
-
 #ifdef USE_RGB_COLOR
 	/**
 	 * Determine the pixel format currently in use for screen rendering.




More information about the Scummvm-git-logs mailing list