summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-06-15 19:09:50 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-06-15 19:09:50 -0700
commit3da9ffaefe9c5557cd8eb8c61e34471b19ca0c5f (patch)
treef21fd53e83889d2fe046fad1a4a7a19627666eeb /src/main.c
parent74a734206e04ec674b0af0179d64a2e8bcc161d9 (diff)
main: quit when the stream ends
I can't see this staying so simple for very long, but for now this at least enables making rototiller-based rkt-sequenced demos that exit gracefully when they're finished. In a future where rtv may play embedded rkt configs+tracks, it needs a way to detect the end of stream without making main exit. But I'll cross that bridge when I get there...
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 28d4b70..119931b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -411,7 +411,7 @@ int main(int argc, const char *argv[])
pexit_if(pthread_create(&rototiller.thread, NULL, rototiller_thread, &rototiller) != 0,
"unable to create dispatch thread");
- for (;;) {
+ while (til_stream_active(rototiller.stream)) {
if (til_fb_flip(rototiller.fb) < 0)
break;
© All Rights Reserved