From 6dd18050bece30e95a6ef2e8beb475e8d6975758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 23 Mar 2025 21:56:32 +0800 Subject: [PATCH] IO: don't suppress IO in debug mode --- src/common/io/io_unix.c | 5 +++++ src/common/io/io_windows.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/common/io/io_unix.c b/src/common/io/io_unix.c index 5623d2dc9..7875c7587 100644 --- a/src/common/io/io_unix.c +++ b/src/common/io/io_unix.c @@ -256,6 +256,11 @@ const char* ffGetTerminalResponse(const char* request, int nParams, const char* bool ffSuppressIO(bool suppress) { + #ifndef NDEBUG + if (instance.config.display.debugMode) + return false; + #endif + static bool init = false; static int origOut = -1; static int origErr = -1; diff --git a/src/common/io/io_windows.c b/src/common/io/io_windows.c index 9f1a96ce5..25f82cdc1 100644 --- a/src/common/io/io_windows.c +++ b/src/common/io/io_windows.c @@ -159,6 +159,11 @@ bool ffPathExpandEnv(const char* in, FFstrbuf* out) bool ffSuppressIO(bool suppress) { + #ifndef NDEBUG + if (instance.config.display.debugMode) + return false; + #endif + static bool init = false; static HANDLE hOrigOut = INVALID_HANDLE_VALUE; static HANDLE hOrigErr = INVALID_HANDLE_VALUE;