mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-06-21 12:03:43 -05:00
Fix rapid scene switch restarting certain transitions (#313)
When using certain transition types repeated scene switches to the same target scene will restart a transition that is already in progress. This can be avoided by using obs_frontend_get_current_scene() instead of switcher->currentScene during the check if the target scene is already active. obs_frontend_get_current_scene() will already point to the new scene, even if the transition is still in progess, while switcher->currentScene will only be updated once a transition is finished.
This commit is contained in:
parent
d397f5e406
commit
aca9b84fc6
|
|
@ -360,8 +360,7 @@ void switchScene(const sceneSwitchInfo &sceneSwitch)
|
|||
}
|
||||
|
||||
obs_source_t *source = obs_weak_source_get_source(sceneSwitch.scene);
|
||||
obs_source_t *currentSource =
|
||||
obs_weak_source_get_source(switcher->currentScene);
|
||||
obs_source_t *currentSource = obs_frontend_get_current_scene();
|
||||
|
||||
if (source && source != currentSource) {
|
||||
transitionData currentTransitionData;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user