[Scummvm-git-logs] scummvm master -> ac9980a9dd676316b589bc197c963c9d8d9a13eb
ccawley2011
ccawley2011 at gmail.com
Wed Jun 23 22:37:07 UTC 2021
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:
ac9980a9dd SDL: Fix the default scale factor for high resolution games
Commit: ac9980a9dd676316b589bc197c963c9d8d9a13eb
https://github.com/scummvm/scummvm/commit/ac9980a9dd676316b589bc197c963c9d8d9a13eb
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-06-23T23:31:49+01:00
Commit Message:
SDL: Fix the default scale factor for high resolution games
Changed paths:
backends/graphics/sdl/sdl-graphics.cpp
backends/graphics/surfacesdl/surfacesdl-graphics.cpp
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 1a7be89ff8..cada88d1bb 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -121,17 +121,17 @@ Common::Rect SdlGraphicsManager::getPreferredFullscreenResolution() {
bool SdlGraphicsManager::defaultGraphicsModeConfig() const {
const Common::ConfigManager::Domain *transientDomain = ConfMan.getDomain(Common::ConfigManager::kTransientDomain);
- if (transientDomain && transientDomain->contains("gfx_mode")) {
- const Common::String &mode = transientDomain->getVal("gfx_mode");
- if (!mode.equalsIgnoreCase("normal") && !mode.equalsIgnoreCase("default")) {
+ if (transientDomain && transientDomain->contains("scaler")) {
+ const Common::String &mode = transientDomain->getVal("scaler");
+ if (!mode.equalsIgnoreCase("default")) {
return false;
}
}
const Common::ConfigManager::Domain *gameDomain = ConfMan.getActiveDomain();
- if (gameDomain && gameDomain->contains("gfx_mode")) {
- const Common::String &mode = gameDomain->getVal("gfx_mode");
- if (!mode.equalsIgnoreCase("normal") && !mode.equalsIgnoreCase("default")) {
+ if (gameDomain && gameDomain->contains("scaler")) {
+ const Common::String &mode = gameDomain->getVal("scaler");
+ if (!mode.equalsIgnoreCase("default")) {
return false;
}
}
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 008e2999f3..e491164ceb 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -717,10 +717,9 @@ 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) {
- // 0 will currently always be Normal1x scaling
- setGraphicsMode(0);
+ setScaler(_videoMode.scalerIndex, 1);
} else {
- setGraphicsMode(getGraphicsModeIdByName(ConfMan.get("gfx_mode")));
+ setScaler(_videoMode.scalerIndex, ConfMan.getInt("scale_factor"));
}
}
More information about the Scummvm-git-logs
mailing list