From 1a0287e2a0ae0da81768beebde7dc561901574db Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 3 Oct 2021 23:49:06 -0700 Subject: Don't call OutputDebugStringW in Release builds --- core/logging.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/logging.cpp') diff --git a/core/logging.cpp b/core/logging.cpp index b06fb35a..78956791 100644 --- a/core/logging.cpp +++ b/core/logging.cpp @@ -41,7 +41,13 @@ void al_print(LogLevel level, FILE *logfile, const char *fmt, ...) fputws(wstr.c_str(), logfile); fflush(logfile); } + /* OutputDebugStringW has no 'level' property to distinguish between + * informational, warning, or error debug messages. So only print them for + * non-Release builds. + */ +#ifdef NDEBUG OutputDebugStringW(wstr.c_str()); +#endif } #else -- cgit v1.2.3