winrt: Fix frozen UI caused by camera search and lock focus.
Instead of yielding thread process events while waiting for focus to complete. Change-Id: I6b5f08bc175af37430c851f151fce5c3bfe238ad Task-Id: QTBUG-48534 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This commit is contained in:
@@ -1118,7 +1118,7 @@ bool QWinRTCameraControl::focus()
|
||||
ComPtr<IAsyncAction> op;
|
||||
HRESULT hr = d->focusControl->FocusAsync(&op);
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
hr = QWinRTFunctions::await(op);
|
||||
hr = QWinRTFunctions::await(op, QWinRTFunctions::ProcessThreadEvents);
|
||||
Q_ASSERT_SUCCEEDED(hr);
|
||||
return hr == S_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user