mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
begin using GetUserDirectory()
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1448 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -293,19 +293,24 @@ bool Copy(const char *srcFilename, const char *destFilename)
|
||||
|
||||
std::string GetUserDirectory()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
char path[MAX_PATH];
|
||||
#ifdef _WIN32
|
||||
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, path)))
|
||||
{
|
||||
return std::string(path);
|
||||
}
|
||||
return std::string("");
|
||||
#else
|
||||
char *dir = getenv("HOME");
|
||||
char *homedir = getenv("HOME");
|
||||
if (!dir)
|
||||
return std::string("");
|
||||
return dir;
|
||||
#ifdef __APPLE__
|
||||
snprintf(path, sizeof(path), "%s/Library/Application Support/Dolphin");
|
||||
#else
|
||||
snprintf(path, sizeof(path), "%s/.dolphin"); // XXX changeme as appropriate
|
||||
#endif
|
||||
#endif
|
||||
return std::string(path);
|
||||
}
|
||||
|
||||
u64 GetSize(const char *filename)
|
||||
|
Reference in New Issue
Block a user