summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-07-16 13:56:06 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-07-16 13:57:55 -0700
commit4b4216de1a5dc59aba06d0defe1a0b9394790c70 (patch)
tree6e4161d176d83a91a1e0c8342504fe365ff981c7 /src
parent1239467bc6c19eca1beaf7aefa1ac499e5ef4c1c (diff)
modules/rkt: track last scene in ctxt->last_scene
Prepartory commit for pausing playback upon entering 99999 scene It needs to trigger only on the edge of entering the scene to permit RocketEditor to unpause playback even if still in scene 99999, if that's what the user is trying to do. It'd be annoying to have it just keep asserting a paused state until the scene idx leaves 99999... But this also enables triggering anything on scene change edges, for future stuff.
Diffstat (limited to 'src')
-rw-r--r--src/modules/rkt/rkt.c2
-rw-r--r--src/modules/rkt/rkt.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c
index 9bc154b..71a00e7 100644
--- a/src/modules/rkt/rkt.c
+++ b/src/modules/rkt/rkt.c
@@ -353,6 +353,8 @@ static void rkt_render_fragment(til_module_context_t *context, til_stream_t *str
txt_free(msg);
}
+
+ ctxt->last_scene = scene;
}
}
diff --git a/src/modules/rkt/rkt.h b/src/modules/rkt/rkt.h
index 241fa24..4ec8599 100644
--- a/src/modules/rkt/rkt.h
+++ b/src/modules/rkt/rkt.h
@@ -29,6 +29,9 @@ typedef struct rkt_context_t {
unsigned scene; /* current scene (usually driven by the scene track data,
* but scener may override it to force showing a specific scene)
*/
+ unsigned last_scene; /* for triggering things on edge of a scene switch
+ * ((like pausing on entering 99999 in creative mode)
+ */
} rkt_context_t;
typedef struct rkt_setup_scene_t {
© All Rights Reserved