Fix issues with linux/mac builds

This commit is contained in:
baldurk
2020-12-09 21:57:15 +00:00
parent 8107a7a795
commit f70c5be592
4 changed files with 8 additions and 5 deletions
+3 -2
View File
@@ -38,7 +38,7 @@ char **GetCurrentEnvironment()
rdcstr execcmd(const char *cmd)
{
FILE *pipe = popen(cmd, FileIO::ReadText);
FILE *pipe = popen(cmd, "r");
if(!pipe)
return "ERROR";
@@ -183,7 +183,8 @@ bool OSUtility::DebuggerPresent()
rdcstr Process::GetEnvVariable(const rdcstr &name)
{
return getenv(name.c_str());
const char *val = getenv(name.c_str());
return val ? val : rdcstr();
}
uint64_t Process::GetMemoryUsage()
+2 -1
View File
@@ -194,7 +194,8 @@ bool OSUtility::DebuggerPresent()
rdcstr Process::GetEnvVariable(const rdcstr &name)
{
return getenv(name.c_str());
const char *val = getenv(name.c_str());
return val ? val : rdcstr();
}
uint64_t Process::GetMemoryUsage()
+1 -1
View File
@@ -85,7 +85,7 @@ rdcstr GetAppFolderFilename(const rdcstr &filename)
homedir = getpwuid(getuid())->pw_dir;
}
rdcstr ret = rdcstr(homedir) + "/.renderdoc/";
rdcstr ret = rdcstr(homedir ? homedir : "") + "/.renderdoc/";
mkdir(ret.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
+2 -1
View File
@@ -658,7 +658,8 @@ bool OSUtility::DebuggerPresent()
rdcstr Process::GetEnvVariable(const rdcstr &name)
{
return getenv(name.c_str());
const char *val = getenv(name.c_str());
return val ? val : rdcstr();
}
uint64_t Process::GetMemoryUsage()