From 458b332e8eb88fa7e6b33bf2e7c7c62e8c8127b9 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Wed, 10 Jun 2020 22:33:30 -0500 Subject: [PATCH] always log popup message to log even when set to hidden --- src/common/Logging.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/Logging.cpp b/src/common/Logging.cpp index 89fc40bf1..7cb10bd13 100644 --- a/src/common/Logging.cpp +++ b/src/common/Logging.cpp @@ -148,6 +148,13 @@ void EmuLogOutput(CXBXR_MODULE cxbxr_module, LOG_LEVEL level, const char *szWarn fflush(stdout); } +static inline void EmuLogOutputEx(CXBXR_MODULE cxbxr_module, LOG_LEVEL level, const char *szWarningMessage, ...) +{ + va_list argp; + va_start(argp, szWarningMessage); + EmuLogOutput(cxbxr_module, level, szWarningMessage, argp); + va_end(argp); +} // print out a custom message to the console or kernel debug log file void NTAPI EmuLogEx(CXBXR_MODULE cxbxr_module, LOG_LEVEL level, const char *szWarningMessage, ...) @@ -286,7 +293,7 @@ void CxbxPopupMessageEx(CXBXR_MODULE cxbxr_module, LOG_LEVEL level, CxbxMsgDlgIc vsprintf(Buffer, message, argp); va_end(argp); - EmuLogEx(cxbxr_module, level, "Popup : %s", Buffer); + EmuLogOutputEx(cxbxr_module, level, "Popup : %s", Buffer); (void)CxbxMessageBox(Buffer, uType); }