Moved STK preferences on mac from old-fashioned unix style ~/.supertuxkart to the more correct ~/Library/Application Support. Should have been done long ago; Motivated by Joerg's modifications on Windows that reminded me of this, and also to have the ability to open 0.6 without screwing my 0.7 settings ;P

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4124 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-10-16 01:47:03 +00:00
parent 4543f6ab5e
commit f8fccf808f

View File

@ -32,6 +32,9 @@
// Some portabilty defines
# endif
# define CONFIGDIR "."
#elif defined(__APPLE__)
# include <unistd.h>
# define CONFIGDIR "Library/Application Support/SuperTuxKart"
#else
# include <unistd.h>
# define CONFIGDIR ".supertuxkart"
@ -349,7 +352,6 @@ std::string FileManager::getHomeDir() const
DIRNAME=s.str();
}
else DIRNAME=".";
#else
if(getenv("HOME")!=NULL)
{
@ -357,7 +359,13 @@ std::string FileManager::getHomeDir() const
}
else
{
#ifdef __APPLE__
fprintf(stderr, "Home directory is undefined, this should NOT happen!\n");
// Fall back to system-wide app data (rather than user-specific data), but should not happen anyway.
DIRNAME = "";
#else
DIRNAME = ".";
#endif
}
DIRNAME += "/";
DIRNAME += CONFIGDIR;