mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-05-09 04:32:13 -05:00
Fix "transitioning from" check not working in studio mode
This commit is contained in:
parent
e7efd95050
commit
d2e7605e5c
|
|
@ -158,8 +158,21 @@ void MacroConditionTransition::TransitionStarted(void *data, calldata_t *cd)
|
|||
|
||||
OBSSourceAutoRelease startSource = obs_transition_get_source(
|
||||
transitionSource, OBS_TRANSITION_SOURCE_A);
|
||||
|
||||
// In studio mode, source A may be a private copy of the scene.
|
||||
// Look up the original by name to get a comparable reference.
|
||||
const bool studioModeActive =
|
||||
obs_frontend_preview_program_mode_active();
|
||||
if (studioModeActive) {
|
||||
OBSSourceAutoRelease startSourceByName = obs_get_source_by_name(
|
||||
obs_source_get_name(startSource));
|
||||
if (startSourceByName) {
|
||||
startSource = std::move(startSourceByName);
|
||||
}
|
||||
}
|
||||
|
||||
OBSSourceAutoRelease endSource =
|
||||
obs_frontend_preview_program_mode_active()
|
||||
studioModeActive
|
||||
? obs_frontend_get_current_scene()
|
||||
: obs_transition_get_source(transitionSource,
|
||||
OBS_TRANSITION_SOURCE_B);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user