mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Fix issues with linux/mac builds
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user