mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 09:05:57 -05:00
Only send scene switch msg if scene was switched
This change is to avoid spamming the connected clients with scene change messages which might not even do anything as the scene change already took place. Additionally it allows scene switch messages to be sent by just calling the switchScene() function.
This commit is contained in:
@@ -554,9 +554,6 @@ void SwitcherData::Thread()
|
||||
lock.unlock();
|
||||
|
||||
if (match) {
|
||||
if (networkConfig.ServerEnabled) {
|
||||
server.sendMessage(scene, transition);
|
||||
}
|
||||
switchScene(scene, transition,
|
||||
tansitionOverrideOverride,
|
||||
adjustActiveTransitionType, verbose);
|
||||
@@ -653,6 +650,10 @@ void switchScene(OBSWeakSource &scene, OBSWeakSource &transition,
|
||||
if (verbose) {
|
||||
blog(LOG_INFO, "switched scene");
|
||||
}
|
||||
|
||||
if (switcher->networkConfig.ServerEnabled) {
|
||||
switcher->server.sendMessage(scene, transition);
|
||||
}
|
||||
}
|
||||
obs_source_release(currentSource);
|
||||
obs_source_release(source);
|
||||
|
||||
Reference in New Issue
Block a user