From 219cfee4729dabaa3fd69cf890cce519bf2005b4 Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Sat, 9 Apr 2022 12:21:39 +0100 Subject: [PATCH] (Windows) Fix output not flushing automatically. --- src/uxnemu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/uxnemu.c b/src/uxnemu.c index 6829c29..05568a9 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -51,6 +51,7 @@ static int error(char *msg, const char *err) { fprintf(stderr, "%s: %s\n", msg, err); + fflush(stderr); return 0; } @@ -256,6 +257,7 @@ load(Uxn *u, char *rom) f->close(f); if(r < 1) return 0; fprintf(stderr, "Loaded %s\n", rom); + fflush(stderr); SDL_SetWindowTitle(gWindow, rom); return 1; } @@ -311,6 +313,7 @@ capture_screen(void) SDL_SaveBMP(surface, fname); SDL_FreeSurface(surface); fprintf(stderr, "Saved %s\n", fname); + fflush(stderr); } static void