Use android properties to pass capture options to the device

This commit is contained in:
baldurk
2018-02-14 19:22:23 +00:00
parent 468c6c1e80
commit 04fac1d6f8
8 changed files with 44 additions and 14 deletions
+6 -1
View File
@@ -122,7 +122,8 @@ int GetCurrentPID(const std::string &deviceID, const std::string &packageName)
return 0;
}
uint32_t StartAndroidPackageForCapture(const char *host, const char *package)
uint32_t StartAndroidPackageForCapture(const char *host, const char *package,
const CaptureOptions &opts)
{
int index = 0;
std::string deviceID;
@@ -142,6 +143,10 @@ uint32_t StartAndroidPackageForCapture(const char *host, const char *package)
// enable the vulkan layer (will only be used by vulkan programs)
adbExecCommand(deviceID, "shell setprop debug.vulkan.layers " RENDERDOC_VULKAN_LAYER_NAME);
// set our property with the capture options encoded, to be picked up by the library on the device
adbExecCommand(deviceID, StringFormat::Fmt("shell setprop debug.rdoc.RENDERDOC_CAPTUREOPTS %s",
opts.EncodeAsString().c_str()));
std::string installedPath = GetPathForPackage(deviceID, packageName);
std::string RDCLib = trim(