mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
Add a message if adb couldn't be found, reduce windows error spam
This commit is contained in:
@@ -331,6 +331,16 @@ void initAdb()
|
||||
if(adb.find('/') != std::string::npos || adb.find('\\') != std::string::npos)
|
||||
workdir = get_dirname(adb);
|
||||
|
||||
RDCLOG("Initialising adb using '%s'", adb.c_str());
|
||||
|
||||
if(adb.empty() || !FileIO::exists(adb.c_str()) || !FileIO::exists((adb + ".exe").c_str()))
|
||||
{
|
||||
if(FileIO::FindFileInPath(adb.c_str()) == "")
|
||||
RDCWARN(
|
||||
"Couldn't locate adb. Ensure adb is in PATH, ANDROID_SDK or ANDROID_HOME is set, or you "
|
||||
"configure your SDK location");
|
||||
}
|
||||
|
||||
Process::LaunchProcess(adb.c_str(), workdir.c_str(), "start-server", true);
|
||||
}
|
||||
void shutdownAdb()
|
||||
|
||||
@@ -556,7 +556,8 @@ static PROCESS_INFORMATION RunProcess(const char *app, const char *workingDir, c
|
||||
|
||||
if(!retValue)
|
||||
{
|
||||
RDCWARN("Process %s could not be loaded.", app);
|
||||
if(!internal)
|
||||
RDCWARN("Process %s could not be loaded.", app);
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
RDCEraseEl(pi);
|
||||
@@ -1003,7 +1004,8 @@ uint32_t Process::LaunchProcess(const char *app, const char *workingDir, const c
|
||||
|
||||
if(pi.dwProcessId == 0)
|
||||
{
|
||||
RDCWARN("Couldn't launch process '%s'", app);
|
||||
if(!internal)
|
||||
RDCWARN("Couldn't launch process '%s'", app);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user