diff options
author | Jonathan Gray | 2003-03-18 06:53:47 +0000 |
---|---|---|
committer | Jonathan Gray | 2003-03-18 06:53:47 +0000 |
commit | 5985310d64045cfea39998dda6ad45577d966392 (patch) | |
tree | 92b5212ae5104c4c04b63f22175873399de3bf90 | |
parent | 0812d3bf444ef6c200d30b4d16d1b095fa571597 (diff) | |
download | scummvm-rg350-5985310d64045cfea39998dda6ad45577d966392.tar.gz scummvm-rg350-5985310d64045cfea39998dda6ad45577d966392.tar.bz2 scummvm-rg350-5985310d64045cfea39998dda6ad45577d966392.zip |
add GF_DEFAULT_TO_1X_SCALER
svn-id: r6830
-rw-r--r-- | common/gameDetector.cpp | 5 | ||||
-rw-r--r-- | common/gameDetector.h | 2 | ||||
-rw-r--r-- | common/main.cpp | 7 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 2 |
4 files changed, 14 insertions, 2 deletions
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); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 4b153be25b..4f857bdf68 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -137,7 +137,7 @@ static const VersionSettings scumm_settings[] = { /* Scumm Version 8 */ {"comi", "The Curse of Monkey Island", GID_CMI, 8, 1, 0, - GF_NEW_OPCODES | GF_AFTER_V6 | GF_AFTER_V7 | GF_AFTER_V8 | GF_NEW_COSTUMES, 0}, + GF_NEW_OPCODES | GF_AFTER_V6 | GF_AFTER_V7 | GF_AFTER_V8 | GF_NEW_COSTUMES | GF_DEFAULT_TO_1X_SCALER, 0}, {NULL, NULL, 0, 0, 0, 0, 0, NULL} }; |