From 2197597f9aa345d1c52806c502bf4f9f6c09a598 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 1 Apr 2006 21:52:33 +0000 Subject: Moved File::resetDefaultDirectories from Engine destructor to runGame (since that is the main spot where we call addDefaultDirectory) svn-id: r21535 --- base/engine.cpp | 2 -- base/main.cpp | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/base/engine.cpp b/base/engine.cpp index ae8bfa0dcf..02ed7d1cdb 100644 --- a/base/engine.cpp +++ b/base/engine.cpp @@ -49,8 +49,6 @@ Engine::Engine(OSystem *syst) } Engine::~Engine() { - Common::File::resetDefaultDirectories(); - delete _mixer; delete _saveFileMan; diff --git a/base/main.cpp b/base/main.cpp index 56a820f438..7e776a7137 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -336,6 +336,9 @@ static int runGame(GameDetector &detector, OSystem &system, const Common::String // Stop all sound processing now (this prevents some race conditions later on) system.clearSoundCallback(); + // Reset the file/directory mappings + Common::File::resetDefaultDirectories(); + return result; } -- cgit v1.2.3