From 3d96e5ddfbb3074e4b618087c1302fe3148071bc Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 24 Oct 2009 14:28:49 -0600 Subject: Make homedir accessible from other files --- src/game.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/game.cpp') 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 #include -#include #include #include @@ -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(); -- cgit v1.2.3-70-g09d2