From 8bd50ffd4ba81cb9c5197bcae926e177cc7a8987 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Fri, 15 Jul 2022 15:09:01 -0700 Subject: 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. --- src/til_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/til_fb.c') diff --git a/src/til_fb.c b/src/til_fb.c index f6a71a8..503af6a 100644 --- a/src/til_fb.c +++ b/src/til_fb.c @@ -305,7 +305,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, 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) { _til_fb_page_t *page; til_fb_t *fb; @@ -328,7 +328,7 @@ int til_fb_new(const til_fb_ops_t *ops, til_settings_t *settings, int n_pages, t fb->ops = ops; if (ops->init) { - r = ops->init(settings, &fb->ops_context); + r = ops->init(setup, &fb->ops_context); if (r < 0) goto fail; } -- cgit v1.2.1