summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-08-29 13:47:44 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-08-29 13:47:44 -0700
commit23a2d320ddb70f07de18860672d61a38445728e3 (patch)
tree56c0e084e9ef14f68143248acf144bd946805e8d
parent64e4cd08b56866ab64da4ab0be158155747243ec (diff)
modules/rkt: drop ad-hoc last_ticks tracking
Commit 64a5b17 added this to til_module_context_t, so it's already being tracked now making this redundant.
-rw-r--r--src/modules/rkt/rkt.c5
-rw-r--r--src/modules/rkt/rkt.h1
2 files changed, 1 insertions, 5 deletions
diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c
index 82dff44..90af8a2 100644
--- a/src/modules/rkt/rkt.c
+++ b/src/modules/rkt/rkt.c
@@ -233,9 +233,7 @@ static void rkt_update_rocket(rkt_context_t *ctxt, unsigned ticks)
rkt_setup_t *s = (rkt_setup_t *)ctxt->til_module_context.setup;
if (!ctxt->paused)
- ctxt->rocket_row += ((double)(ticks - ctxt->last_ticks)) * ctxt->rows_per_ms;
-
- ctxt->last_ticks = ticks;
+ ctxt->rocket_row += ((double)(ticks - ctxt->til_module_context.last_ticks)) * ctxt->rows_per_ms;
if (!s->connect)
return;
@@ -287,7 +285,6 @@ static til_module_context_t * rkt_create_context(const til_module_t *module, til
}
ctxt->rows_per_ms = s->rows_per_ms;
- ctxt->last_ticks = ticks;
rkt_update_rocket(ctxt, ticks);
diff --git a/src/modules/rkt/rkt.h b/src/modules/rkt/rkt.h
index cff768c..ede973a 100644
--- a/src/modules/rkt/rkt.h
+++ b/src/modules/rkt/rkt.h
@@ -21,7 +21,6 @@ typedef struct rkt_context_t {
const struct sync_track *scene_track;
double rows_per_ms;
double rocket_row;
- unsigned last_ticks;
unsigned last_connect; /* ticks at last connect attempt */
unsigned paused:1;
unsigned connected:1; /* currently connected to the RocketEditor */
© All Rights Reserved