summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-02-18 04:04:07 -0800
committerVito Caputo <vcaputo@pengaru.com>2021-02-18 04:04:07 -0800
commit1fd20d00ec5ed8f17783c4b64fa66e76ffad14f2 (patch)
treedad350257b94c472e80670a62d8ab0d121960697
parentf2d13f0b8cee3c68fd63e060facbf62c16e24ba2 (diff)
modules/rtv: fix "none" snow to actually blank
This manifests in the current unconfigured rtv glimmer shows, since the default is a the "none" module when no settings are applied. But it turns out this isn't just a glimmer problem, "none" is advertised in the settings as a blanking alternative to snow. So it's actually broken in rototiller as well. This fixes it by detecting the nil "none" module's lack of any prepare_frame or render_fragment methods, and open coding the blanker with a fb_fragment_zero() inline.
-rw-r--r--src/modules/rtv/rtv.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c
index 373da93..7731603 100644
--- a/src/modules/rtv/rtv.c
+++ b/src/modules/rtv/rtv.c
@@ -279,7 +279,14 @@ static void rtv_prepare_frame(void *context, unsigned ticks, unsigned n_cpus, fb
if (now >= ctxt->next_hide_caption)
ctxt->caption = NULL;
- rototiller_module_render(ctxt->channel->module, ctxt->channel->module_ctxt, ticks, fragment);
+ /* 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)
+ fb_fragment_zero(fragment);
+ else
+ rototiller_module_render(ctxt->channel->module, ctxt->channel->module_ctxt, ticks, fragment);
}
© All Rights Reserved