mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Invoke CaptureContext function calls onto UI thread, from python thread
* Any work that might use Qt needs to happen on the UI thread, so when running a python script on the python thread we need to invoke across. We wrap the main ICaptureContext interface to block invoke onto the UI for any function calls that aren't just returning internal data.
This commit is contained in:
@@ -36,6 +36,8 @@ namespace Ui
|
||||
class PythonShell;
|
||||
}
|
||||
|
||||
struct CaptureContextInvoker;
|
||||
|
||||
class PythonShell : public QFrame, public IPythonShell
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -66,6 +68,7 @@ private slots:
|
||||
private:
|
||||
Ui::PythonShell *ui;
|
||||
ICaptureContext &m_Ctx;
|
||||
CaptureContextInvoker *m_ThreadCtx = NULL;
|
||||
|
||||
ScintillaEdit *scriptEditor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user