mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-13 01:05:44 +00:00
don't wait for adb start-server as it may never exit
This commit is contained in:
@@ -579,7 +579,7 @@ extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_EnumerateAndroidDevices(rdc
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_AndroidInitialise()
|
||||
{
|
||||
Android::adbExecCommand("", "start-server", ".", true);
|
||||
Android::initAdb();
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_AndroidShutdown()
|
||||
|
||||
@@ -37,6 +37,7 @@ void ResetCaptureSettings(const std::string &deviceID);
|
||||
void ExtractDeviceIDAndIndex(const std::string &hostname, int &index, std::string &deviceID);
|
||||
Process::ProcessResult adbExecCommand(const std::string &deviceID, const std::string &args,
|
||||
const string &workDir = ".", bool silent = false);
|
||||
void initAdb();
|
||||
void shutdownAdb();
|
||||
bool InjectWithJDWP(const std::string &deviceID, uint16_t jdwpport);
|
||||
};
|
||||
|
||||
@@ -307,6 +307,12 @@ Process::ProcessResult adbExecCommand(const std::string &device, const std::stri
|
||||
deviceArgs = StringFormat::Fmt("-s %s %s", device.c_str(), args.c_str());
|
||||
return execCommand(adb, deviceArgs, workDir, silent);
|
||||
}
|
||||
void initAdb()
|
||||
{
|
||||
// we don't use adbExecCommand because we need to be sure we don't wait for it to exit
|
||||
std::string adb = getToolPath(ToolDir::PlatformTools, "adb", false);
|
||||
Process::LaunchProcess(adb.c_str(), ".", "start-server", true);
|
||||
}
|
||||
void shutdownAdb()
|
||||
{
|
||||
if(adbKillServer)
|
||||
|
||||
Reference in New Issue
Block a user