From 8272e969c05d3d9000ab07996e22b40490d14bdd Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Fri, 1 Apr 2022 18:30:47 -0700 Subject: 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. --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 1737c28..690c1f9 100644 --- a/src/main.c +++ b/src/main.c @@ -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; -- cgit v1.2.3