From 53b67e88710bb4c550e698dfba1183488691fe36 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Mon, 27 Aug 2018 11:08:37 +0000 Subject: [PATCH] Update logging function to log in debug mode Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4142 --- src/hardware/mame/emu.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/hardware/mame/emu.h b/src/hardware/mame/emu.h index ab0fae59..6f154995 100644 --- a/src/hardware/mame/emu.h +++ b/src/hardware/mame/emu.h @@ -94,7 +94,15 @@ public: return clockRate; } - void logerror(const char* msg, ...) { + void logerror(const char* format, ...) { +#if C_DEBUG + char buf[512*2]; + va_list msg; + va_start(msg,format); + vsprintf(buf,format,msg); + va_end(msg); + LOG(LOG_MISC,LOG_NORMAL)("%s",buf); +#endif } static int tag() {