aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
authorColin Snover2017-11-07 21:30:49 -0600
committerColin Snover2017-11-07 21:34:42 -0600
commit8e8ec3900c90fc9e18571df84c5e9e754479052b (patch)
tree4652774aff132cfe4f7ed0235520fb880bbed6c8 /backends/graphics
parent8a42959eed458e3ffa913b8e2cce463857cd9dc1 (diff)
downloadscummvm-rg350-8e8ec3900c90fc9e18571df84c5e9e754479052b.tar.gz
scummvm-rg350-8e8ec3900c90fc9e18571df84c5e9e754479052b.tar.bz2
scummvm-rg350-8e8ec3900c90fc9e18571df84c5e9e754479052b.zip
SDL: Get correct default graphics mode ID when queried
Fixes Trac#10312.
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 0e0a45a38f..f4aaa92955 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -95,6 +95,10 @@ bool SdlGraphicsManager::defaultGraphicsModeConfig() const {
}
int SdlGraphicsManager::getGraphicsModeIdByName(const Common::String &name) const {
+ if (name == "normal" || name == "default") {
+ return getDefaultGraphicsMode();
+ }
+
const OSystem::GraphicsMode *mode = getSupportedGraphicsModes();
while (mode && mode->name != nullptr) {
if (name.equalsIgnoreCase(mode->name)) {