diff options
Diffstat (limited to 'src/modules/plato')
-rw-r--r-- | src/modules/plato/plato.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/modules/plato/plato.c b/src/modules/plato/plato.c index a20137e..89661c3 100644 --- a/src/modules/plato/plato.c +++ b/src/modules/plato/plato.c @@ -691,6 +691,20 @@ static void plato_render_fragment(til_module_context_t *context, til_stream_t *s } +static int plato_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup); + + +til_module_t plato_module = { + .create_context = plato_create_context, + .render_fragment = plato_render_fragment, + .setup = plato_setup, + .name = "plato", + .description = "Platonic solids rendered in 3D", + .author = "Vito Caputo <vcaputo@pengaru.com>", + .flags = TIL_MODULE_OVERLAYABLE, +}; + + static int plato_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup) { const char *orbit_rate; @@ -744,7 +758,7 @@ static int plato_setup(const til_settings_t *settings, til_setting_t **res_setti if (res_setup) { plato_setup_t *setup; - setup = til_setup_new(settings, sizeof(*setup), NULL); + setup = til_setup_new(settings, sizeof(*setup), NULL, &plato_module); if (!setup) return -ENOMEM; @@ -756,14 +770,3 @@ static int plato_setup(const til_settings_t *settings, til_setting_t **res_setti return 0; } - - -til_module_t plato_module = { - .create_context = plato_create_context, - .render_fragment = plato_render_fragment, - .setup = plato_setup, - .name = "plato", - .description = "Platonic solids rendered in 3D", - .author = "Vito Caputo <vcaputo@pengaru.com>", - .flags = TIL_MODULE_OVERLAYABLE, -}; |