summaryrefslogtreecommitdiff
path: root/src/til_module_context.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-06-15 18:19:50 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-06-15 18:19:50 -0700
commit64a5b1747b41f8dcb1d8cf6e6108c386e2904585 (patch)
tree127587127e7b92b6eecf13afbc216e1e7ed67d1e /src/til_module_context.h
parentf89689ba9f198755a3f2ce05dec11b7ea185f374 (diff)
til_module_context: s/ticks/last_ticks/ in context
And just maintain it as the last ticks value after rendering with the context... A couple modules were already doing this manually in an ad-hoc fashion, just make it a general thing. Updated those modules to reflect the new situation Especially in a rkt world with modules::mixer doing fades, it becomes common to render the same context twice in the same frame for the blending. We need to prevent accelerated animations in such situations. For now let's just rely on ticks in a delta-T fashion to prevent animating the context when ticks is the same. modules::stars in particular needs this fixed up, upcoming commit
Diffstat (limited to 'src/til_module_context.h')
-rw-r--r--src/til_module_context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/til_module_context.h b/src/til_module_context.h
index 05f77ab..e4c0bca 100644
--- a/src/til_module_context.h
+++ b/src/til_module_context.h
@@ -10,7 +10,7 @@ struct til_module_context_t {
const til_module_t *module;
til_stream_t *stream; /* optional stream this context is part of (module_contexts are discoverable @setup->path when part of a stream) */
unsigned seed;
- unsigned ticks;
+ unsigned last_ticks; /* this gets updated after every render finishes, starts as the ticks supplied @ context create */
unsigned n_cpus;
til_setup_t *setup; /* Baked setup this context was made from, reffed by context.
* Always present as it provides the path, which is generally derived from a settings instance.
© All Rights Reserved