diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-07-15 15:09:01 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-07-15 15:09:01 -0700 |
commit | 8bd50ffd4ba81cb9c5197bcae926e177cc7a8987 (patch) | |
tree | 0a2c50fed2c7b800fade874fd33ce99806d90fb7 /src/til_fb.h | |
parent | f1e59ffe5607ae8b84f03f153cacb27bc3024bac (diff) |
til_fb: switch til_fb_ops_t.init() to use til_setup_t
Until now the fb init has been receiving a til_settings_t to
access its setup. Now that there's a til_setup_t for
representing the fully baked setup, let's bring the fb stuff
up to speed so their init() behaves more like
til_module_t.create_context() WRT settings/setup.
This involves some reworking of how settings are handled in
{drm,sdl}_fb.c but nothing majorly different.
The only real funcitonal change that happened in the course of
this work is I made it possible now to actually instruct SDL to
do a more legacy SDL_WINDOW_FULLSCREEN vs.
SDL_WINDOW_FULLSCREEN_DESKTOP where SDL will attempt to switch
the video mode.
This is triggered by specifying both a size=WxH and fullscreen=on
for video=sdl. Be careful though, I've observed some broken
display states when specifying goofy sizes, which look like Xorg
bugs.
Diffstat (limited to 'src/til_fb.h')
-rw-r--r-- | src/til_fb.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/til_fb.h b/src/til_fb.h index a9636e4..c5bf1fe 100644 --- a/src/til_fb.h +++ b/src/til_fb.h @@ -44,7 +44,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 til_settings_t *settings, void **res_context); + int (*init)(const til_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); @@ -57,7 +57,7 @@ til_fb_page_t * til_fb_page_get(til_fb_t *fb); void til_fb_page_put(til_fb_t *fb, til_fb_page_t *page); 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, til_settings_t *settings, int n_pages, til_fb_t **res_fb); +int til_fb_new(const til_fb_ops_t *ops, const til_setup_t *setup, int n_pages, til_fb_t **res_fb); void til_fb_rebuild(til_fb_t *fb); void * til_fb_context(til_fb_t *fb); int til_fb_flip(til_fb_t *fb); |