summaryrefslogtreecommitdiff
path: root/src/til_settings.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-07-15 15:09:01 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-07-15 15:09:01 -0700
commit8bd50ffd4ba81cb9c5197bcae926e177cc7a8987 (patch)
tree0a2c50fed2c7b800fade874fd33ce99806d90fb7 /src/til_settings.h
parentf1e59ffe5607ae8b84f03f153cacb27bc3024bac (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_settings.h')
-rw-r--r--src/til_settings.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/til_settings.h b/src/til_settings.h
index cbff2a7..4586f11 100644
--- a/src/til_settings.h
+++ b/src/til_settings.h
@@ -5,6 +5,7 @@
typedef struct til_setting_t til_setting_t;
typedef struct til_settings_t til_settings_t;
+typedef struct til_setup_t til_setup_t;
/* Individual setting description */
typedef struct til_setting_desc_t {
@@ -21,7 +22,7 @@ typedef struct til_setting_desc_t {
typedef struct til_setting_desc_generator_t {
const char *key; /* key this generator applies to */
const char **value_ptr; /* where to put the value */
- int (*func)(void *setup_context, const til_setting_desc_t **res_desc);
+ int (*func)(til_setup_t *setup_context, const til_setting_desc_t **res_desc);
} til_setting_desc_generator_t;
/* Encapsulates a single til_settings_t entry */
@@ -40,7 +41,7 @@ int til_settings_add_value(til_settings_t *settings, const char *key, const char
void til_settings_reset_descs(til_settings_t *settings);
int til_settings_get_and_describe_value(const til_settings_t *settings, const til_setting_desc_t *desc, const char **res_value, til_setting_t **res_setting, const til_setting_desc_t **res_desc);
char * til_settings_as_arg(const til_settings_t *settings);
-int til_settings_apply_desc_generators(const til_settings_t *settings, const til_setting_desc_generator_t generators[], unsigned n_generators, void *setup_context, til_setting_t **res_setting, const til_setting_desc_t **res_desc);
+int til_settings_apply_desc_generators(const til_settings_t *settings, const til_setting_desc_generator_t generators[], unsigned n_generators, til_setup_t *setup, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup);
int til_setting_desc_clone(const til_setting_desc_t *desc, const til_setting_desc_t **res_desc);
til_setting_desc_t * til_setting_desc_free(const til_setting_desc_t *desc);
© All Rights Reserved