mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-24 06:48:24 -05:00
Fix freeze when changing scene collection
This commit is contained in:
parent
9bcced524b
commit
624ff9f5c6
|
|
@ -601,6 +601,17 @@ void handleExit()
|
|||
FreeSceneSwitcher();
|
||||
}
|
||||
|
||||
void handleSceneCollectionChanging()
|
||||
{
|
||||
if (switcher->settingsWindowOpened) {
|
||||
AdvSceneSwitcher::window->close();
|
||||
}
|
||||
if (!switcher->stop) {
|
||||
switcher->sceneColletionStop = true;
|
||||
switcher->Stop();
|
||||
}
|
||||
}
|
||||
|
||||
// Note to future self:
|
||||
// be careful using switcher->m here as there is potential for deadlocks when using
|
||||
// frontend functions such as obs_frontend_set_current_scene()
|
||||
|
|
@ -646,6 +657,11 @@ static void OBSEvent(enum obs_frontend_event event, void *switcher)
|
|||
case OBS_FRONTEND_EVENT_STREAMING_STOPPING:
|
||||
setStreamStopping();
|
||||
break;
|
||||
#if LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(27, 2, 0)
|
||||
case OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGING:
|
||||
handleSceneCollectionChanging();
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -607,7 +607,8 @@ void SwitcherData::saveGeneralSettings(obs_data_t *obj)
|
|||
|
||||
cooldown.Save(obj, "cooldown", "cooldownUnit");
|
||||
|
||||
obs_data_set_bool(obj, "active", !stop);
|
||||
obs_data_set_bool(obj, "active", sceneColletionStop ? true : !stop);
|
||||
sceneColletionStop = false;
|
||||
obs_data_set_int(obj, "startup_behavior", startupBehavior);
|
||||
|
||||
obs_data_set_int(obj, "autoStartEvent",
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ struct SwitcherData {
|
|||
bool transitionActive = false;
|
||||
bool waitForTransition = false;
|
||||
bool stop = false;
|
||||
bool sceneColletionStop = false;
|
||||
bool verbose = false;
|
||||
bool disableHints = false;
|
||||
bool hideLegacyTabs = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user