summaryrefslogtreecommitdiff
path: root/src/play.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-10-10 19:52:03 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-10-10 19:52:03 -0700
commit36b0f83075c15fc8d107ece20bd6be95a8d2588c (patch)
treead85c51109d3c765f88dc35585dd640d6e77ed96 /src/play.h
parentcbbe0abec7e0e0f21f3315b455f3f795cedf2c9a (diff)
play: introduce play_run_slice()HEADmaster
Sometimes a more granular main loop integration is required. In such situations play_run() taking over is untenable, so this splits out the body of play_run()'s loop as a separately callable function. Existing main loops can use this to run the play main loop for a single slice. The impetus for this has been experimenting with escripten support in SARS, e.g. emscripten_set_main_loop_arg((void(*)(void *))play_run_slice, play, -1, 1);
Diffstat (limited to 'src/play.h')
-rw-r--r--src/play.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/play.h b/src/play.h
index 1d4ec6b..b3c56b5 100644
--- a/src/play.h
+++ b/src/play.h
@@ -57,6 +57,7 @@ typedef struct play_ops_t {
play_t * play_startup(int argc, char *argv[], unsigned flags, const play_ops_t *ops[]);
int play_shutdown(play_t *play);
+int play_run_slice(play_t *play);
void play_run(play_t *play);
void play_music_set(play_t *play, unsigned flags, const char *fmt, ...);
© All Rights Reserved