feat: customisable switch generated source groups (#5016)

Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
3djc
2024-06-08 07:51:46 +10:00
committed by GitHub
co-authored by elecpower
parent 26c96ccdd0
commit 280d3af62c
16 changed files with 123 additions and 4 deletions
+10
View File
@@ -241,6 +241,11 @@ bool isSourceAvailable(int source)
if (source >= MIXSRC_FIRST_TRAINER && source <= MIXSRC_LAST_TRAINER)
return g_model.trainerData.mode > 0;
#if defined(FUNCTION_SWITCHES)
if (source >= MIXSRC_FIRST_CUSTOMSWITCH_GROUP && source <= MIXSRC_LAST_CUSTOMSWITCH_GROUP)
return getSwitchCountInFSGroup(source - MIXSRC_FIRST_CUSTOMSWITCH_GROUP + 1) > 0;
#endif
if (source >= MIXSRC_FIRST_CH && source <= MIXSRC_LAST_CH) {
return isChannelUsed(source - MIXSRC_FIRST_CH);
}
@@ -323,6 +328,11 @@ bool isSourceAvailableInInputs(int source)
if (source >= MIXSRC_FIRST_SWITCH && source <= MIXSRC_LAST_SWITCH)
return SWITCH_EXISTS(source - MIXSRC_FIRST_SWITCH);
#if defined(FUNCTION_SWITCHES)
if (source >= MIXSRC_FIRST_CUSTOMSWITCH_GROUP && source <= MIXSRC_LAST_CUSTOMSWITCH_GROUP)
return getSwitchCountInFSGroup(source - MIXSRC_FIRST_CUSTOMSWITCH_GROUP + 1) > 0;
#endif
if (source >= MIXSRC_FIRST_CH && source <= MIXSRC_LAST_CH)
return true;