mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Add helper to invoke back onto the UI thread from the replay thread
This commit is contained in:
@@ -85,6 +85,12 @@ struct MiniQtInvoker : ObjectForwarder<IMiniQtHelper>
|
||||
{
|
||||
MiniQtInvoker(PythonShell *shell, IMiniQtHelper &obj) : ObjectForwarder(shell, obj) {}
|
||||
virtual ~MiniQtInvoker() {}
|
||||
void InvokeOntoUIThread(std::function<void()> callback)
|
||||
{
|
||||
// this function is already thread safe since it's invoking, so just call it directly
|
||||
m_Obj.InvokeOntoUIThread(callback);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// all functions invoke onto the UI thread since they deal with widgets!
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user