summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/engine.cpp2
-rw-r--r--src/main.h1
-rw-r--r--src/resources/buddylist.cpp2
3 files changed, 2 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index f0902bb0..7181ac80 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -159,7 +159,7 @@ Engine::Engine():
// Create dialogs
chatWindow = new ChatWindow(
- std::string(homeDir) + std::string("chatlog.txt"));
+ config.getValue("homeDir", "") + std::string("chatlog.txt"));
statusWindow = new StatusWindow();
buyDialog = new BuyDialog();
sellDialog = new SellDialog();
diff --git a/src/main.h b/src/main.h
index dcee297a..a6af43fe 100644
--- a/src/main.h
+++ b/src/main.h
@@ -71,7 +71,6 @@ extern unsigned char state;
extern Sound sound;
extern int screenW, screenH, bitDepth, displayFlags;
extern bool useOpenGL;
-extern char *homeDir;
extern Configuration config;
#endif
diff --git a/src/resources/buddylist.cpp b/src/resources/buddylist.cpp
index 9f11b5f7..a227ec71 100644
--- a/src/resources/buddylist.cpp
+++ b/src/resources/buddylist.cpp
@@ -29,7 +29,7 @@
BuddyList::BuddyList()
{
// Find saved buddy list file
- filename = new std::string(std::string(homeDir) + "buddy.txt");
+ filename = new std::string(std::string(config.getValue("homeDir", "") + "buddy.txt"));
// Load buddy from file
loadFile();