mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-27 20:31:02 +00:00
Fixed the launch of adb when using the Android SDK path on Windows
This commit is contained in:
committed by
Baldur Karlsson
parent
1db2947c86
commit
827c2c24f8
@@ -998,19 +998,27 @@ uint32_t Process::LaunchProcess(const char *app, const char *workingDir, const c
|
||||
{
|
||||
HANDLE hChildStdOutput_Rd = NULL, hChildStdError_Rd = NULL;
|
||||
|
||||
rdcstr appPath = app;
|
||||
size_t len = appPath.length();
|
||||
rdcstr ext;
|
||||
if(len > 4)
|
||||
ext = strlower(appPath.substr(len - 4));
|
||||
if(ext != ".exe")
|
||||
appPath += ".exe";
|
||||
|
||||
PROCESS_INFORMATION pi =
|
||||
RunProcess(app, workingDir, cmdLine, {}, internal, result ? &hChildStdOutput_Rd : NULL,
|
||||
result ? &hChildStdError_Rd : NULL);
|
||||
RunProcess(appPath.c_str(), workingDir, cmdLine, {}, internal,
|
||||
result ? &hChildStdOutput_Rd : NULL, result ? &hChildStdError_Rd : NULL);
|
||||
|
||||
if(pi.dwProcessId == 0)
|
||||
{
|
||||
if(!internal)
|
||||
RDCWARN("Couldn't launch process '%s'", app);
|
||||
RDCWARN("Couldn't launch process '%s'", appPath.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!internal)
|
||||
RDCLOG("Launched process '%s' with '%s'", app, cmdLine);
|
||||
RDCLOG("Launched process '%s' with '%s'", appPath.c_str(), cmdLine);
|
||||
|
||||
ResumeThread(pi.hThread);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user