aboutsummaryrefslogtreecommitdiffstats
path: root/core/logging.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-10-03 23:49:06 -0700
committerChris Robinson <[email protected]>2021-10-03 23:49:06 -0700
commit1a0287e2a0ae0da81768beebde7dc561901574db (patch)
tree5a908c613e71a6f1b64206d26eddcc6e15f63d44 /core/logging.cpp
parentf92cc479d82fbf85591d8918bbf469c4b329c31c (diff)
Don't call OutputDebugStringW in Release builds
Diffstat (limited to 'core/logging.cpp')
-rw-r--r--core/logging.cpp6
1 files changed, 6 insertions, 0 deletions
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