summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-05-01 12:28:06 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-05-01 13:50:28 -0700
commitaea618965fa437ffdfef485dc3671af923ea5e8c (patch)
tree9bd5478ab18d444d42a5b5a046a6878d5a2e4f10 /src
parent4c81b4d185eddba20b514cebd8b0afd6567f603a (diff)
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".
Diffstat (limited to 'src')
-rw-r--r--src/modules/rtv/rtv.c13
1 files 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
© All Rights Reserved