summaryrefslogtreecommitdiff
path: root/src/til_fb.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-11-30 11:34:15 -0800
committerVito Caputo <vcaputo@pengaru.com>2023-11-30 11:44:14 -0800
commit28d12a899645be09dae7e4cb8c293bf7fc64d6ad (patch)
treead195d50f3d488521add9f81f7fd291fc7d92743 /src/til_fb.h
parent97b3dd17c1499c7ffd6d429a01d64ceaed233df2 (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.h')
-rw-r--r--src/til_fb.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/til_fb.h b/src/til_fb.h
index af17025..935b310 100644
--- a/src/til_fb.h
+++ b/src/til_fb.h
@@ -11,6 +11,7 @@
typedef struct til_fb_fragment_t til_fb_fragment_t;
typedef struct til_fb_fragment_ops_t til_fb_fragment_ops_t;
+typedef struct til_video_setup_t til_video_setup_t;
#define TIL_FB_DRAW_FLAG_TEXTURABLE 0x1
@@ -38,7 +39,7 @@ typedef struct til_fb_t til_fb_t;
/* Supply this struct to fb_new() with the appropriate context */
typedef struct til_fb_ops_t {
int (*setup)(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup);
- int (*init)(const char *title, const til_setup_t *setup, void **res_context);
+ int (*init)(const char *title, const til_video_setup_t *setup, void **res_context);
void (*shutdown)(til_fb_t *fb, void *context);
int (*acquire)(til_fb_t *fb, void *context, void *page);
void (*release)(til_fb_t *fb, void *context);
@@ -53,7 +54,7 @@ til_fb_fragment_t * til_fb_fragment_snapshot(til_fb_fragment_t **fragment_ptr, i
til_fb_fragment_t * til_fb_fragment_reclaim(til_fb_fragment_t *fragment);
til_fb_t * til_fb_free(til_fb_t *fb);
void til_fb_get_put_pages_count(til_fb_t *fb, unsigned *count);
-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);
void til_fb_rebuild(til_fb_t *fb);
void til_fb_halt(til_fb_t *fb);
void * til_fb_context(til_fb_t *fb);
© All Rights Reserved