diff options
author | Edmondo Tommasina <[email protected]> | 2017-04-05 21:03:55 +0200 |
---|---|---|
committer | Julien Isorce <[email protected]> | 2017-04-13 12:38:49 +0100 |
commit | 5589fd89e1337a03c947840b344f515cb1d3a96d (patch) | |
tree | 7ff84e6b13312c14d674468618ce998a27a65543 /src/gallium/auxiliary/hud/hud_context.c | |
parent | 01d0c5a92294e3413a8e72970e25635057674659 (diff) |
gallium/hud: set the dump file streams to line buffered
Flush the HUD value streams to the dump files after every newline.
v2: check that fopen succeeded (Julien)
Reviewed-and-Tested-by: Julien Isorce <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/hud/hud_context.c')
-rw-r--r-- | src/gallium/auxiliary/hud/hud_context.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index 29ef9eee31c..f492c81fe6d 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -972,6 +972,8 @@ hud_graph_set_dump_file(struct hud_graph *gr) strcat(dump_file, "/"); strcat_without_spaces(dump_file, gr->name); gr->fd = fopen(dump_file, "w+"); + if (gr->fd) + setvbuf(gr->fd, NULL, _IOLBF, 0); free(dump_file); } } |