From 99f05d9a964629d51f0d42e69ab546b8ae04fc75 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 5 Aug 2023 13:24:30 -0700 Subject: modules/{compose,montage,rtv}: exclude builtins Basically everywhere the TIL_MODULE_HERMETIC|TIL_MODULE_EXPERIMENTAL exclusions were being applied needed TIL_MODULE_BUILTIN added. Mostly this is to prevent randomizers from tripping over builtins in the available modules lists they draw from. Because builtins aren't visually interesting by themselves, and in some cases don't currently even have a means of being randomized properly like ref's path setting. This wasn't needed previously since builtins were kept off the modules list altogether. But since 1a6210be that changed and they must be explicitly filtered by flag instead. Note I deliberately left the rkt case with just a TODO comment. It's not a randomizer situation, and it might be acceptable to let rkt just show everything all the time in the module lists. That whole situation there is for advanced users. Also note that without this, rtv et al would easily trigger an assert on NULL setup due to the "none" builtin. Since there's still work to be done there in callers properly handling NULL @res_setup on a successful finalize. But this commit mitigates that by avoiding the builtins in the randomizers. --- src/modules/rtv/rtv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/rtv') diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index a9e8678..2a7c02d 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -239,7 +239,7 @@ static int rtv_should_skip_module(const rtv_setup_t *setup, const til_module_t * */ if (!setup->channels[0]) { /* for "all" skip these, but you can still explicitly name them. */ - if ((module->flags & (TIL_MODULE_HERMETIC | TIL_MODULE_EXPERIMENTAL))) + if ((module->flags & (TIL_MODULE_HERMETIC | TIL_MODULE_EXPERIMENTAL | TIL_MODULE_BUILTIN))) return 1; return 0; -- cgit v1.2.3