From 3da9ffaefe9c5557cd8eb8c61e34471b19ca0c5f Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 15 Jun 2023 19:09:50 -0700 Subject: 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... --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.c') 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; -- cgit v1.2.1