From 81600569117b0441e03042431c16ef98651aaee0 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Sun, 8 Aug 2010 16:19:37 +0000 Subject: [PATCH] Bugfix: EE and IOP consoles were piping through printf formatting, causing occasional crashes (introduced in r3609) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3621 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/DebugTools/Debug.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pcsx2/DebugTools/Debug.h b/pcsx2/DebugTools/Debug.h index 035fc9cb0b..92fded01cb 100644 --- a/pcsx2/DebugTools/Debug.h +++ b/pcsx2/DebugTools/Debug.h @@ -205,9 +205,11 @@ public: // -------------------------------------------------------------------------------------- // Special console logger for Virtual Machine log sources, such as the EE and IOP console // writes (actual game developer messages and such). These logs do *not* automatically -// append newlines, since the VM generates them manually. +// append newlines, since the VM generates them manually; and they do *not* support printf +// formatting, since anything coming over the EE/IOP consoles should be considered raw +// string data. (otherwise %'s would get mis-interpreted). // -class ConsoleLogFromVM : public ConsoleLogSource +class ConsoleLogFromVM : ConsoleLogSource { typedef ConsoleLogSource _parent; @@ -215,6 +217,13 @@ public: ConsoleLog_ImplementBaseAPI(ConsoleLogFromVM) using _parent::IsEnabled; + bool Write( const wxChar* msg ) const + { + ConsoleColorScope cs(DefaultColor); + DoWrite(msg); + return false; + } + virtual void DoWrite( const wxChar* msg ) const { Console.WriteRaw( msg );