Change by-ref passed float or bool parameters to callbacks in public API

* Mostly used for passing a progress float back during a long blocking
  call like opening a capture or doing a copy.
* This is much more feasible for python to bind to.
* In several cases we just use a tiny lambda that updates a float anyway
  since we can't push the progress directly into a progress dialog, but
  need to let it query from a temporary in-between float.
This commit is contained in:
baldurk
2018-01-01 14:56:10 +00:00
parent 2e74989b69
commit 7a2305ae31
24 changed files with 212 additions and 154 deletions
+2 -1
View File
@@ -610,7 +610,8 @@ void CaptureDialog::androidWarn_mouseClick()
// call into APK pull, patch, install routine, then continue
LambdaThread *patch = new LambdaThread([this, exe, &patchSucceeded, &progress]() {
rdcstr host = m_Ctx.Replay().CurrentRemote()->hostname;
if(RENDERDOC_AddLayerToAndroidPackage(host.c_str(), exe.toUtf8().data(), &progress))
if(RENDERDOC_AddLayerToAndroidPackage(host.c_str(), exe.toUtf8().data(),
[&progress](float p) { progress = p; }))
{
// Sucess!
patchSucceeded = true;