summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-30 20:45:49 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-30 20:45:49 +0200
commit00667a05dfb638dff9fbd92d407f2cb2cfce077c (patch)
treec42a5eb4afd4537703191ee5e92ca4b80685b765
parentdd68dea5b808070546433b06f17597fb46db33b7 (diff)
parenta37130214eb8698a1f8f55d2b7b0bd2b0aac4ad3 (diff)
downloadmana-client-00667a05dfb638dff9fbd92d407f2cb2cfce077c.tar.gz
mana-client-00667a05dfb638dff9fbd92d407f2cb2cfce077c.tar.bz2
mana-client-00667a05dfb638dff9fbd92d407f2cb2cfce077c.tar.xz
mana-client-00667a05dfb638dff9fbd92d407f2cb2cfce077c.zip
Merge branch '0.0.29'
-rw-r--r--src/main.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3b0b35b7..f37f9de9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -316,22 +316,21 @@ static void initHomeDir(const Options &options)
if (homeDir.empty())
{
- homeDir = std::string(PHYSFS_getUserDir()) +
- "/." +
- branding.getValue("appShort", "tmw");
+#ifdef __APPLE__
+ // Use Application Directory instead of .tmw
+ homeDir = std::string(PHYSFS_getUserDir()) +
+ "/Library/Application Support/" +
+ branding.getValue("appName", "The Mana World");
+#else
+ homeDir = std::string(PHYSFS_getUserDir()) +
+ "/." + branding.getValue("appShort", "tmw");
+#endif
}
#if defined WIN32
if (!CreateDirectory(homeDir.c_str(), 0) &&
GetLastError() != ERROR_ALREADY_EXISTS)
-#elif defined __APPLE__
- // Use Application Directory instead of .tmw
- homeDir = std::string(PHYSFS_getUserDir()) +
- "/Library/Application Support/" +
- branding.getValue("appName", "The Mana World");
- if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) &&
- (errno != EEXIST))
#else
- // Checking if /home/user/.tmw folder exists.
+ // Create home directory if it doesn't exist already
if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) &&
(errno != EEXIST))
#endif
@@ -415,7 +414,8 @@ static void initEngine(const Options &options)
SDL_EnableUNICODE(1);
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
- SDL_WM_SetCaption(branding.getValue("appName", "The Mana World").c_str(), NULL);
+ SDL_WM_SetCaption(branding.getValue("appName", "The Mana World").c_str(),
+ NULL);
ResourceManager *resman = ResourceManager::getInstance();
@@ -595,7 +595,7 @@ static void printHelp()
static void printVersion()
{
- std::cout << strprintf(_("The Mana World %s"), FULL_VERSION) << std::endl;
+ std::cout << strprintf("The Mana World %s", FULL_VERSION) << std::endl;
}
static void parseOptions(int argc, char *argv[], Options &options)