From 5985310d64045cfea39998dda6ad45577d966392 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Tue, 18 Mar 2003 06:53:47 +0000 Subject: add GF_DEFAULT_TO_1X_SCALER svn-id: r6830 --- common/gameDetector.cpp | 5 ++++- common/gameDetector.h | 2 ++ common/main.cpp | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index 56c6b3c9fc..af236127f9 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -158,6 +158,7 @@ GameDetector::GameDetector() { #else _gfx_mode = GFX_NORMAL; #endif + _default_gfx_mode = true; #if defined(USE_NULL_DRIVER) _gfx_driver = GD_NULL; @@ -467,8 +468,10 @@ void GameDetector::setGame(const String &name) { int GameDetector::parseGraphicsMode(const char *s) { const GraphicsModes *gm = gfx_modes; while(gm->name) { - if (!scumm_stricmp(gm->name, s)) + if (!scumm_stricmp(gm->name, s)) { + _default_gfx_mode = false; return gm->id; + } gm++; } diff --git a/common/gameDetector.h b/common/gameDetector.h index e65bd24a2b..7eeeb479c8 100644 --- a/common/gameDetector.h +++ b/common/gameDetector.h @@ -68,6 +68,7 @@ enum GameFeatures { GF_AMIGA = 1 << 14, GF_HUMONGOUS = 1 << 15, GF_NEW_COSTUMES = 1 << 16, + GF_DEFAULT_TO_1X_SCALER = 1 << 17, GF_HAS_ROOMTABLE = GF_AFTER_V7, GF_USE_ANGLES = GF_AFTER_V7, @@ -147,6 +148,7 @@ public: int _gfx_driver; int _gfx_mode; + bool _default_gfx_mode; int _cdrom; int _save_slot; diff --git a/common/main.cpp b/common/main.cpp index baaf9a5312..fdb8f9463f 100644 --- a/common/main.cpp +++ b/common/main.cpp @@ -197,6 +197,13 @@ int main(int argc, char *argv[]) { prop.caption = detector.getGameName().c_str(); system->property(OSystem::PROP_SET_WINDOW_CAPTION, &prop); + // See if the game should default to 1x scaler + if ((detector._default_gfx_mode) && + (detector._features & GF_DEFAULT_TO_1X_SCALER)) { + prop.gfx_mode = GFX_NORMAL; + system->property(OSystem::PROP_SET_GFX_MODE, &prop); + } + // Create the game engine Engine *engine = Engine::createFromDetector(&detector, system); -- cgit v1.2.3