Merge pull request #354 from michaelrgb/master

Android user experience fixes.
This commit is contained in:
Baldur Karlsson
2016-09-13 15:55:39 +02:00
committed by GitHub
2 changed files with 7 additions and 10 deletions
@@ -58,17 +58,12 @@ namespace FileIO
{
const char *GetTempRootPath()
{
static string ret;
GetExecutableFilename(ret);
// This folder is writable even if the APK does not have manifest write permissions.
ret = "/data/data/" + ret + "/files";
return ret.c_str();
return "/sdcard";
}
string GetAppFolderFilename(const string &filename)
{
return GetTempRootPath() + filename;
return GetTempRootPath() + string("/") + filename;
}
// For RenderDocCmd.apk, this returns "org.renderdoc.renderdoccmd"
+5 -3
View File
@@ -141,10 +141,12 @@ void GetDefaultFiles(const char *logBaseName, string &capture_filename, string &
GetExecutableFilename(path);
const char *mod = strrchr(path.c_str(), '/');
if(mod == NULL)
mod = "unknown";
else
if(mod != NULL)
mod++;
else if(path.length())
mod = path.c_str(); // Keep Android package name i.e. org.company.app
else
mod = "unknown";
target = string(mod);