Changed AppFolderFilename on Android to fix SaveShaderCache.

This commit is contained in:
Michael Rennie
2016-08-18 13:24:44 +01:00
committed by baldurk
parent 4c0ff83d83
commit 255f8cd34e
3 changed files with 17 additions and 12 deletions
@@ -72,6 +72,11 @@ const char *GetTempRootPath()
return ret.c_str();
}
string GetAppFolderFilename(const string &filename)
{
return GetTempRootPath() + filename;
}
// For RenderDocCmd.apk, this returns "org.renderdoc.renderdoccmd"
// For other APKs, we use it to get the writable temp directory.
void GetExecutableFilename(string &selfName)
@@ -222,6 +222,18 @@ const char *GetTempRootPath()
return "/tmp";
}
string GetAppFolderFilename(const string &filename)
{
passwd *pw = getpwuid(getuid());
const char *homedir = pw->pw_dir;
string ret = string(homedir) + "/.renderdoc/";
mkdir(ret.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
return ret + filename;
}
void GetExecutableFilename(string &selfName)
{
char path[512] = {0};
-12
View File
@@ -46,18 +46,6 @@ namespace FileIO
// in posix/.../..._stringio.cpp
const char *GetTempRootPath();
string GetAppFolderFilename(const string &filename)
{
passwd *pw = getpwuid(getuid());
const char *homedir = pw->pw_dir;
string ret = string(homedir) + "/.renderdoc/";
mkdir(ret.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
return ret + filename;
}
void CreateParentDirectory(const string &filename)
{
string fn = dirname(filename);