diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-11-30 11:34:15 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-11-30 11:44:14 -0800 |
commit | 28d12a899645be09dae7e4cb8c293bf7fc64d6ad (patch) | |
tree | ad195d50f3d488521add9f81f7fd291fc7d92743 /src/til_fb.c | |
parent | 97b3dd17c1499c7ffd6d429a01d64ceaed233df2 (diff) |
til: wire up til_video_setup_t throughout *_fb
Preparatory commit for aspect ratio settings at the fb layer.
This slightly reworks how main::setup_video() integrates the
selected fb backend's setup_func to better resemble how the
module setup_funcs work now, with more clearly separated
settings-building and setup-baking/finalizing phases. Which
makes inserting the ratio setting in the middle of the front-end
and back-end setup_funcs fairly trivial.
Not a fan of all the casts, but there will probably be more
helpers introduced to take care of that and make
til_video_setup_t more of a first-class thing facilitating the fb
stuff.
Diffstat (limited to 'src/til_fb.c')
-rw-r--r-- | src/til_fb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/til_fb.c b/src/til_fb.c index a802c40..3c19ae5 100644 --- a/src/til_fb.c +++ b/src/til_fb.c @@ -8,6 +8,7 @@ #include "til_fb.h" #include "til_settings.h" #include "til_util.h" +#include "til_video_setup.h" /* Copyright (C) 2016-2017 Vito Caputo <vcaputo@pengaru.com> */ @@ -550,7 +551,7 @@ til_fb_t * til_fb_free(til_fb_t *fb) /* create a new fb instance */ -int til_fb_new(const til_fb_ops_t *ops, const char *title, const til_setup_t *setup, int n_pages, til_fb_t **res_fb) +int til_fb_new(const til_fb_ops_t *ops, const char *title, const til_video_setup_t *setup, int n_pages, til_fb_t **res_fb) { _til_fb_page_t *page; til_fb_t *fb; @@ -560,7 +561,7 @@ int til_fb_new(const til_fb_ops_t *ops, const char *title, const til_setup_t *se assert(ops->page_alloc); assert(ops->page_free); assert(ops->page_flip); - assert(!setup || setup->creator == ops); + assert(!setup && setup->til_setup.creator == ops); assert(n_pages > 1); assert(res_fb); |