mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-23 10:20:50 +00:00
Changed AppFolderFilename on Android to fix SaveShaderCache.
This commit is contained in:
@@ -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};
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user