diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/engine.cpp | 4 | ||||
-rw-r--r-- | base/engine.h | 4 | ||||
-rw-r--r-- | base/gameDetector.cpp | 2 | ||||
-rw-r--r-- | base/gameDetector.h | 3 |
4 files changed, 7 insertions, 6 deletions
diff --git a/base/engine.cpp b/base/engine.cpp index 50bccb4746..4e8bb4a749 100644 --- a/base/engine.cpp +++ b/base/engine.cpp @@ -32,10 +32,10 @@ /* FIXME - BIG HACK for MidiEmu */ Engine *g_engine = 0; -Engine::Engine(GameDetector *detector, OSystem *syst) +Engine::Engine(OSystem *syst) : _system(syst), _gameDataPath(ConfMan.get("path")) { g_engine = this; - _mixer = detector->createMixer(); + _mixer = GameDetector::createMixer(); _timer = g_timer; diff --git a/base/engine.h b/base/engine.h index 9d77668c40..a37cd08198 100644 --- a/base/engine.h +++ b/base/engine.h @@ -30,9 +30,7 @@ extern const char *gScummVMBuildDate; // e.g. "2003-06-24" extern const char *gScummVMFullVersion; // e.g. "ScummVM 0.4.1 (2003-06-24)" class SoundMixer; -class GameDetector; class Timer; -struct GameSettings; class Engine { public: @@ -44,7 +42,7 @@ protected: const Common::String _gameDataPath; public: - Engine(GameDetector *detector, OSystem *syst); + Engine(OSystem *syst); virtual ~Engine(); // Invoke the main engine loop using this method diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp index 6dd67aa8bf..ef12840b24 100644 --- a/base/gameDetector.cpp +++ b/base/gameDetector.cpp @@ -500,9 +500,11 @@ bool GameDetector::detectGame() { _game = findGame(realGame, &_plugin); if (_game.gameName) { + _gameName = _game.gameName; printf("Trying to start game '%s'\n", _game.description); return true; } else { + _gameName.clear(); printf("Failed game detection\n"); return false; } diff --git a/base/gameDetector.h b/base/gameDetector.h index 1bad32078d..d57cdb5b06 100644 --- a/base/gameDetector.h +++ b/base/gameDetector.h @@ -64,7 +64,8 @@ public: bool detectMain(); String _targetName; - GameSettings _game; + String _gameName; + GameSettings _game; // TODO: Eventually get rid of _game or at least make it protected const Plugin *_plugin; bool _dumpScripts; |