summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-10-24 14:28:49 -0600
committerJared Adams <jaxad0127@gmail.com>2009-10-24 14:28:49 -0600
commit3d96e5ddfbb3074e4b618087c1302fe3148071bc (patch)
tree047ddd0fc52ec646900f5f76b9630fbb734207b5 /src/game.cpp
parentf5ea5b40a465e28d4c97a5f040dba2b4a8da60f8 (diff)
downloadmana-3d96e5ddfbb3074e4b618087c1302fe3148071bc.tar.gz
mana-3d96e5ddfbb3074e4b618087c1302fe3148071bc.tar.bz2
mana-3d96e5ddfbb3074e4b618087c1302fe3148071bc.tar.xz
mana-3d96e5ddfbb3074e4b618087c1302fe3148071bc.zip
Make homedir accessible from other files
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 856288bc..6ce3a1e8 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -92,7 +92,6 @@
#include <guichan/focushandler.hpp>
#include <fstream>
-#include <physfs.h>
#include <sstream>
#include <string>
@@ -404,15 +403,13 @@ static bool saveScreenshot()
do {
screenshotCount++;
filename.str("");
- filenameSuffix.str("");
- filename << PHYSFS_getUserDir();
#if (defined __USE_UNIX98 || defined __FreeBSD__)
- filenameSuffix << ".mana/";
+ filename << getHomeDirectory();
#elif defined __APPLE__
- filenameSuffix << "Desktop/";
+ filename << PHYSFS_getUserDir();
+ filename << "Desktop/";
#endif
- filenameSuffix << "Mana_Screenshot_" << screenshotCount << ".png";
- filename << filenameSuffix.str();
+ filename << "Mana_Screenshot_" << screenshotCount << ".png";
testExists.open(filename.str().c_str(), std::ios::in);
found = !testExists.is_open();
testExists.close();