diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-01-11 16:42:14 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-01-11 22:31:31 -0800 |
commit | 0805372ed5460cf4a886e04bf65a5895413463a3 (patch) | |
tree | b76f1de370a9a36198c6113c08d2f8daa2206188 /src | |
parent | 6153122a24e847ade9c9d2b84ef8dd125e2a772b (diff) |
main: experimenting with ANSI codes for --print-pipes
This turns --print-pipes into a more top-like display. Redirect
the FPS on stderr somewhere else to get less flickering
e.g. 2>/dev/null
pipes print to stdout.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -336,8 +336,10 @@ static void * rototiller_thread(void *_rt) til_module_render(rt->module_context, rt->stream, ticks, &fragment); til_fb_fragment_submit(fragment); - if (rt->args.print_pipes) /* render threads are idle at this point */ + if (rt->args.print_pipes) { /* render threads are idle at this point */ + printf("\x1b[2J\x1b[;H"); /* ANSI codes for clear screen and move cursor to top left */ til_stream_fprint(rt->stream, stdout); + } } return NULL; |