aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorMax Horn2003-10-10 13:55:08 +0000
committerMax Horn2003-10-10 13:55:08 +0000
commit5301edc38306c27143f38d74085e6c095688f6aa (patch)
tree101c5188d06ac1f476edae9f3a5755e48554dc64 /base
parent1f9497cb1fbfcc8c3ffd412ce450144983b2452d (diff)
downloadscummvm-rg350-5301edc38306c27143f38d74085e6c095688f6aa.tar.gz
scummvm-rg350-5301edc38306c27143f38d74085e6c095688f6aa.tar.bz2
scummvm-rg350-5301edc38306c27143f38d74085e6c095688f6aa.zip
some cleanup
svn-id: r10720
Diffstat (limited to 'base')
-rw-r--r--base/engine.cpp8
-rw-r--r--base/engine.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/base/engine.cpp b/base/engine.cpp
index 1445c8d6b2..ff74e8b83d 100644
--- a/base/engine.cpp
+++ b/base/engine.cpp
@@ -25,6 +25,7 @@
#include "base/engine.h"
#include "base/gameDetector.h"
#include "common/config-manager.h"
+#include "common/file.h"
#include "common/timer.h"
#include "sound/mixer.h"
@@ -32,13 +33,14 @@
Engine *g_engine = 0;
Engine::Engine(GameDetector *detector, OSystem *syst)
- : _system(syst) {
+ : _system(syst), _gameDataPath(ConfMan.get("path")) {
g_engine = this;
_mixer = detector->createMixer();
- _gameDataPath = strdup(ConfMan.get("path").c_str()); // FIXME - leak. Just conver to a String?
-
_timer = g_timer;
+
+ // Set default file directory
+ File::setDefaultDirectory(_gameDataPath);
}
Engine::~Engine() {
diff --git a/base/engine.h b/base/engine.h
index 367e35f132..e1bb4c71cc 100644
--- a/base/engine.h
+++ b/base/engine.h
@@ -22,6 +22,7 @@
#define ENGINE_H
#include "common/scummsys.h"
+#include "common/str.h"
#include "common/system.h"
extern const char *gScummVMVersion; // e.g. "0.4.1"
@@ -67,7 +68,7 @@ public:
Timer * _timer;
protected:
- const char *_gameDataPath;
+ const Common::String _gameDataPath;
public:
Engine(GameDetector *detector, OSystem *syst);