From aea618965fa437ffdfef485dc3671af923ea5e8c Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 1 May 2022 12:28:06 -0700 Subject: modules/rtv: snow_module=blank is blanking, "none" for disabled It's no longer necessary to specify both snow_duration=0 AND snow_module=none to disable snow, just specify snow_module=none. A future commit should really make describing the "snow_duration" setting contingent on snow_module != "none". --- src/modules/rtv/rtv.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index ef6be98..501e47d 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -132,7 +132,7 @@ static void setup_next_channel(rtv_context_t *ctxt, unsigned ticks) } if (!ctxt->n_channels || - (ctxt->channel != &ctxt->snow_channel && (ctxt->snow_channel.module != &rtv_none_module || ctxt->snow_duration))) { + (ctxt->channel != &ctxt->snow_channel && ctxt->snow_channel.module != &rtv_none_module)) { ctxt->last_channel = ctxt->channel; ctxt->channel = &ctxt->snow_channel; @@ -265,14 +265,7 @@ static void rtv_prepare_frame(void *context, unsigned ticks, unsigned n_cpus, ti if (now >= ctxt->next_hide_caption) ctxt->caption = NULL; - /* there's a special-case "none" (or unconfigured) snow module, that just blanks, - * it's a nil module so just implement it here. - */ - if (!ctxt->channel->module->render_fragment && - !ctxt->channel->module->prepare_frame) - til_fb_fragment_clear(fragment); - else - til_module_render(ctxt->channel->module, ctxt->channel->module_ctxt, ticks, fragment); + til_module_render(ctxt->channel->module, ctxt->channel->module_ctxt, ticks, fragment); } @@ -379,7 +372,7 @@ static int rtv_setup(const til_settings_t *settings, til_setting_t **res_setting r = til_settings_get_and_describe_value(settings, &(til_setting_desc_t){ - .name = "Module to use for snow (\"none\" for blank)", + .name = "Module for snow (\"blank\" for blanking, \"none\" to disable)", .key = "snow_module", .preferred = "snow", .annotations = NULL -- cgit v1.2.3