Explorar o código

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
Ilya Melamed %!s(int64=7) %!d(string=hai) anos
pai
achega
e265fc92ed
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      UI/api-interface.cpp

+ 2 - 0
UI/api-interface.cpp

@@ -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));
 		}