summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-07-16 00:48:03 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-07-16 00:48:03 +0000
commit012a21654ee705f821e31f723e5c804dd414078f (patch)
tree7b0aa844ee85dd261ddf760db2c75a721c0216c0 /src/main.cpp
parent75b2e2feba3273c2d0f698e4024d845c404e076e (diff)
downloadmana-012a21654ee705f821e31f723e5c804dd414078f.tar.gz
mana-012a21654ee705f821e31f723e5c804dd414078f.tar.bz2
mana-012a21654ee705f821e31f723e5c804dd414078f.tar.xz
mana-012a21654ee705f821e31f723e5c804dd414078f.zip
A little improvement in the code.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a61874c8..1991aa5a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -137,10 +137,10 @@ void init_engine()
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
std::string homeDir = "";
-
-#ifdef __USE_UNIX98
+#ifndef __USE_UNIX98
// In Windows and other systems we currently store data next to executable.
- // So homeDir keeps being ""
+ homeDir = TMW_DATADIR;
+#else
// But, in UNIX we store data in ~/.tmw/
passwd *pass = getpwuid(geteuid());
@@ -190,11 +190,7 @@ void init_engine()
config.setValue("fpslimit", 0);
config.setValue("updatehost", "http://themanaworld.org/files");
config.setValue("customcursor", 1);
- #ifdef __USE_UNIX98
- config.setValue("homeDir", homeDir);
- #else
- config.setValue("homeDir", TMW_DATADIR);
- #endif
+ config.setValue("homeDir", homeDir);
// Checking if the configuration file exists... otherwise creates it with
// default options !