diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-04-01 18:30:47 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-04-01 18:30:47 -0700 |
commit | 8272e969c05d3d9000ab07996e22b40490d14bdd (patch) | |
tree | 4ee1f5b80702eee5a006b4a19cf3cd8d39da66c3 /src | |
parent | 6edde492d901a7f8ae071580bb06f1851a631387 (diff) |
rototiller: bump submodule for instantiated setups
Prior to this in some modules you could manipulate their settings
while watching their output, and the changes would be realized
*immediately*.
Rototiller has firmed up the application of settings so they're
no longer module-global and instead apply to an allocated setup
instance that is then supplied to create_context().
As a result, in glimmer, one must always now click "Go!" to see
the effects of new settings.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -123,6 +123,7 @@ static void * glimmer_thread(void *foo) static void glimmer_go(GtkButton *button, gpointer user_data) { til_settings_t *settings; + void *setup = NULL; int r; if (glimmer.fb) { @@ -143,12 +144,15 @@ static void glimmer_go(GtkButton *button, gpointer user_data) gettimeofday(&glimmer.start_tv, NULL); glimmer_active_module(&glimmer.module, &settings); + if (glimmer.module->setup) + glimmer.module->setup(settings, NULL, NULL, &setup); r = til_module_create_context( glimmer.module, glimmer_get_ticks( &glimmer.start_tv, &glimmer.start_tv, glimmer.ticks_offset), + setup, &glimmer.module_context); if (r < 0) { puts("context no go!"); @@ -239,7 +243,7 @@ static void glimmer_settings_rebuild(const til_module_t *module, til_settings_t focused = gtk_window_get_focus(GTK_WINDOW(glimmer.window)); til_settings_reset_descs(settings); - while (module->setup(settings, &setting, &desc) > 0) { + while (module->setup(settings, &setting, &desc, NULL) > 0) { if (!setting) { til_settings_add_value(settings, desc->key, desc->preferred, NULL); continue; |