aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2004-11-24 00:14:21 +0000
committerEugene Sandulenko2004-11-24 00:14:21 +0000
commit31e434dcf1e46510606efa3025c24c17ace379c6 (patch)
treeaddc1c7b6b9b2489eb9aca49e21ee0c729671adb /base/main.cpp
parent6414ec92a2a3509946ae4ec35a3a77e76ad152df (diff)
downloadscummvm-rg350-31e434dcf1e46510606efa3025c24c17ace379c6.tar.gz
scummvm-rg350-31e434dcf1e46510606efa3025c24c17ace379c6.tar.bz2
scummvm-rg350-31e434dcf1e46510606efa3025c24c17ace379c6.zip
Fix a`ll engines. They work, though current fix is just temporary.
There are plans to add some brains to GameDetector class, which will let us avoid passing detector to init() method. svn-id: r15873
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp31
1 files changed, 2 insertions, 29 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 695df68546..3abb77bc94 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -35,7 +35,6 @@
#include "base/version.h"
#include "common/config-manager.h"
#include "common/file.h"
-#include "common/scaler.h" // For GFX_NORMAL
#include "common/timer.h"
#include "gui/newgui.h"
#include "gui/launcher.h"
@@ -247,11 +246,6 @@ static int runGame(GameDetector &detector, OSystem *system) {
system->setWindowCaption(caption.c_str());
}
- const bool useDefaultGraphicsMode =
- !ConfMan.hasKey("gfx_mode", detector._targetName) ||
- !scumm_stricmp(ConfMan.get("gfx_mode", detector._targetName).c_str(), "normal") ||
- !scumm_stricmp(ConfMan.get("gfx_mode", detector._targetName).c_str(), "default");
-
// Create the game engine
Engine *engine = detector.createEngine(system);
assert(engine);
@@ -265,29 +259,8 @@ static int runGame(GameDetector &detector, OSystem *system) {
int result;
- // Start GFX transaction
- system->beginGFXTransaction();
-
- // See if the game should default to 1x scaler
- if (useDefaultGraphicsMode && (detector._game.features & GF_DEFAULT_TO_1X_SCALER)) {
- system->setGraphicsMode(GFX_NORMAL);
- } else {
- // Override global scaler with any game-specific define
- if (ConfMan.hasKey("gfx_mode")) {
- system->setGraphicsMode(ConfMan.get("gfx_mode").c_str());
- }
- }
-
- // (De)activate aspect-ratio correction as determined by the config settings
- system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio"));
-
- // (De)activate fullscreen mode as determined by the config settings
- system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
-
- // Init the engine (this might change the screen parameters
- result = engine->init();
-
- system->endGFXTransaction();
+ // Init the engine (this might change the screen parameters
+ result = engine->init(detector);
// Run the game engine if the initialization was successful.
if (result == 0) {