mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-28 08:08:44 -05:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user