mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-22 01:05:53 -05:00
fix audio valid(), skip uninit exec switches, skip setting scene and transition for audio / exec as this is done in generic switch
This commit is contained in:
@@ -229,7 +229,8 @@ bool AudioSwitch::initialized()
|
||||
|
||||
bool AudioSwitch::valid()
|
||||
{
|
||||
return SceneSwitcherEntry::valid() && WeakSourceValid(audioSource);
|
||||
return !initialized() ||
|
||||
(SceneSwitcherEntry::valid() && WeakSourceValid(audioSource));
|
||||
}
|
||||
|
||||
AudioSwitch::AudioSwitch(OBSWeakSource scene_, OBSWeakSource transition_,
|
||||
@@ -351,9 +352,6 @@ AudioSwitchWidget::AudioSwitchWidget(AudioSwitch *s) : SwitchWidget(s)
|
||||
SceneSwitcher::populateAudioSelection(audioSources);
|
||||
|
||||
if (s) {
|
||||
scenes->setCurrentText(GetWeakSourceName(s->scene).c_str());
|
||||
transitions->setCurrentText(
|
||||
GetWeakSourceName(s->transition).c_str());
|
||||
audioSources->setCurrentText(
|
||||
GetWeakSourceName(s->audioSource).c_str());
|
||||
audioVolumeThreshold->setValue(s->volumeThreshold);
|
||||
|
||||
@@ -99,6 +99,8 @@ void SwitcherData::checkExeSwitch(bool &match, OBSWeakSource &scene,
|
||||
// Check for match
|
||||
GetProcessList(runningProcesses);
|
||||
for (ExecutableSwitch &s : executableSwitches) {
|
||||
if (!s.initialized())
|
||||
continue;
|
||||
// True if executable switch is running (direct)
|
||||
bool equals = runningProcesses.contains(s.exe);
|
||||
// True if executable switch is running (regex)
|
||||
@@ -214,9 +216,6 @@ ExecutableSwitchWidget::ExecutableSwitchWidget(ExecutableSwitch *s)
|
||||
SceneSwitcher::populateProcessSelection(processes);
|
||||
|
||||
if (s) {
|
||||
scenes->setCurrentText(GetWeakSourceName(s->scene).c_str());
|
||||
transitions->setCurrentText(
|
||||
GetWeakSourceName(s->transition).c_str());
|
||||
processes->setCurrentText(s->exe);
|
||||
requiresFocus->setChecked(s->inFocus);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user