Skip to content

Commit 7c7bf59

Browse files
committed
verbosity: drop duplicate printf on macOS emit path
Every log line on macOS appeared twice in terminal output: [INFO][Audio] Started synchronous audio driver [INFO][Audio] Started synchronous audio driver [INFO][Display] Found display driver: "gl" [INFO][Display] Found display driver: "gl" ROOT CAUSE: the TARGET_OS_MAC emit block in RARCH_LOG_V() wrote the same line twice - once via printf() to stdout, then again via fprintf(fp, ...). fp defaults to stderr (retro_main_log_file_init line 181), only overridden when the user configures an explicit log file path. So with no log file (the common case), fp == stderr and both writes hit the same terminal. Every other platform branch in the same function writes only to fp: Qt/WinRT, Android (via __android_log_vprint), and the generic #else fallback. The macOS block was the lone outlier. FIX: drop the printf(). Terminal visibility is preserved because fp defaults to stderr; users who configure an explicit log file see the log in that file only, as on every other platform. The dupe has existed since the TARGET_OS_OSX block was first added; it became user-visible on PPC/Leopard after 77cd5bc widened the condition from TARGET_OS_OSX to TARGET_OS_MAC && !TARGET_OS_IPHONE (10.5 doesn't define TARGET_OS_OSX).
1 parent 797b79b commit 7c7bf59

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

verbosity.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
321321
}
322322

323323
#if TARGET_OS_MAC && !TARGET_OS_IPHONE
324-
printf("%s %s", tag_v, buffer);
325324
if (fp)
326325
{
327326
fprintf(fp, "%s %s", tag_v, buffer);

0 commit comments

Comments
 (0)