UI: Block when calling obs_frontend_set_current_scene
Uses WaitConnection() when calling obs_frontend_set_current_scene to ensure that the calling thread and the UI thread are synchronized when setting the current scene via this function. Closes obsproject/obs-studio#1234
This commit is contained in:
parent
c768f703ad
commit
e265fc92ed
@ -93,9 +93,11 @@ struct OBSStudioAPI : obs_frontend_callbacks {
|
||||
{
|
||||
if (main->IsPreviewProgramMode()) {
|
||||
QMetaObject::invokeMethod(main, "TransitionToScene",
|
||||
WaitConnection(),
|
||||
Q_ARG(OBSSource, OBSSource(scene)));
|
||||
} else {
|
||||
QMetaObject::invokeMethod(main, "SetCurrentScene",
|
||||
WaitConnection(),
|
||||
Q_ARG(OBSSource, OBSSource(scene)),
|
||||
Q_ARG(bool, false));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user