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
This commit is contained in:
Jake.Stine 2010-08-08 16:19:37 +00:00
parent d7a09fa4d7
commit 8160056911
1 changed files with 11 additions and 2 deletions

View File

@ -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 );