mirror of https://github.com/PCSX2/pcsx2.git
Removed NULL-able DoWrite/DoWriteLn in IConsoleWriter (threaded logging crashed when changing writers on the fly).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2200 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
dd0b49e80d
commit
0068ec9cd0
|
@ -72,10 +72,10 @@ static const ConsoleColors DefaultConsoleColor = Color_Default;
|
|||
//
|
||||
struct IConsoleWriter
|
||||
{
|
||||
// Write implementation for internal use only. (can be NULL)
|
||||
// Write implementation for internal use only.
|
||||
void (__concall *DoWrite)( const wxString& fmt );
|
||||
|
||||
// WriteLn implementation for internal use only. (can be NULL)
|
||||
// WriteLn implementation for internal use only.
|
||||
void (__concall *DoWriteLn)( const wxString& fmt );
|
||||
|
||||
// SetColor implementation for internal use only.
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
bool HasIdealWidth() const { return m_idealWidth != wxDefaultCoord; }
|
||||
|
||||
protected:
|
||||
|
||||
void OnActivate(wxActivateEvent& evt);
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
|
@ -60,8 +60,8 @@ static void __concall ConsoleNull_DoWriteLn( const wxString& fmt ) {}
|
|||
|
||||
const IConsoleWriter ConsoleWriter_Null =
|
||||
{
|
||||
NULL, //ConsoleNull_DoWrite,
|
||||
NULL, //ConsoleNull_DoWriteLn,
|
||||
ConsoleNull_DoWrite,
|
||||
ConsoleNull_DoWriteLn,
|
||||
ConsoleNull_DoSetColor,
|
||||
|
||||
ConsoleNull_Newline,
|
||||
|
@ -458,7 +458,7 @@ const IConsoleWriter& IConsoleWriter::ClearColor() const
|
|||
|
||||
bool IConsoleWriter::Write( const char* fmt, ... ) const
|
||||
{
|
||||
if( DoWrite == NULL ) return false;
|
||||
if( DoWrite == ConsoleNull_DoWrite ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -470,7 +470,7 @@ bool IConsoleWriter::Write( const char* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::Write( ConsoleColors color, const char* fmt, ... ) const
|
||||
{
|
||||
if( DoWrite == NULL ) return false;
|
||||
if( DoWrite == ConsoleNull_DoWrite ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -483,7 +483,7 @@ bool IConsoleWriter::Write( ConsoleColors color, const char* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::WriteLn( const char* fmt, ... ) const
|
||||
{
|
||||
if( DoWriteLn == NULL ) return false;
|
||||
if( DoWriteLn == ConsoleNull_DoWriteLn ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -495,7 +495,7 @@ bool IConsoleWriter::WriteLn( const char* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::WriteLn( ConsoleColors color, const char* fmt, ... ) const
|
||||
{
|
||||
if( DoWriteLn == NULL ) return false;
|
||||
if( DoWriteLn == ConsoleNull_DoWriteLn ) return false;
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
ConsoleColorScope cs( color );
|
||||
|
@ -507,7 +507,7 @@ bool IConsoleWriter::WriteLn( ConsoleColors color, const char* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::Error( const char* fmt, ... ) const
|
||||
{
|
||||
if( DoWriteLn == NULL ) return false;
|
||||
if( DoWriteLn == ConsoleNull_DoWriteLn ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -520,7 +520,7 @@ bool IConsoleWriter::Error( const char* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::Warning( const char* fmt, ... ) const
|
||||
{
|
||||
if( DoWriteLn == NULL ) return false;
|
||||
if( DoWriteLn == ConsoleNull_DoWriteLn ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -537,7 +537,7 @@ bool IConsoleWriter::Warning( const char* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::Write( const wxChar* fmt, ... ) const
|
||||
{
|
||||
if( DoWrite == NULL ) return false;
|
||||
if( DoWrite == ConsoleNull_DoWrite ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -549,7 +549,7 @@ bool IConsoleWriter::Write( const wxChar* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::Write( ConsoleColors color, const wxChar* fmt, ... ) const
|
||||
{
|
||||
if( DoWrite == NULL ) return false;
|
||||
if( DoWrite == ConsoleNull_DoWrite ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -562,7 +562,7 @@ bool IConsoleWriter::Write( ConsoleColors color, const wxChar* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::WriteLn( const wxChar* fmt, ... ) const
|
||||
{
|
||||
if( DoWriteLn == NULL ) return false;
|
||||
if( DoWriteLn == ConsoleNull_DoWriteLn ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -574,7 +574,7 @@ bool IConsoleWriter::WriteLn( const wxChar* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::WriteLn( ConsoleColors color, const wxChar* fmt, ... ) const
|
||||
{
|
||||
if( DoWriteLn == NULL ) return false;
|
||||
if( DoWriteLn == ConsoleNull_DoWriteLn ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -587,7 +587,7 @@ bool IConsoleWriter::WriteLn( ConsoleColors color, const wxChar* fmt, ... ) cons
|
|||
|
||||
bool IConsoleWriter::Error( const wxChar* fmt, ... ) const
|
||||
{
|
||||
if( DoWriteLn == NULL ) return false;
|
||||
if( DoWriteLn == ConsoleNull_DoWriteLn ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
@ -600,7 +600,7 @@ bool IConsoleWriter::Error( const wxChar* fmt, ... ) const
|
|||
|
||||
bool IConsoleWriter::Warning( const wxChar* fmt, ... ) const
|
||||
{
|
||||
if( DoWriteLn == NULL ) return false;
|
||||
if( DoWriteLn == ConsoleNull_DoWriteLn ) return false;
|
||||
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
|
|
|
@ -145,10 +145,12 @@ wxDialogWithHelpers::wxDialogWithHelpers( wxWindow* parent, int id, const wxStr
|
|||
if( m_hasContextHelp )
|
||||
delete wxHelpProvider::Set( new wxSimpleHelpProvider() );
|
||||
|
||||
// Note: currently the Close (X) button doesn't appear to work in dialogs. Docs indicate
|
||||
// that it should, so I presume the problem is in wxWidgets and that (hopefully!) an updated
|
||||
// version will fix it later. I tried to fix it using a manual Connect but it didn't do
|
||||
// any good.
|
||||
// GTK/Linux Note: currently the Close (X) button doesn't appear to work in dialogs. Docs
|
||||
// indicate that it should, so I presume the problem is in wxWidgets and that (hopefully!)
|
||||
// an updated version will fix it later. I tried to fix it using a manual Connect but it
|
||||
// didn't do any good. (problem could also be my Co-Linux / x-window manager)
|
||||
|
||||
//Connect( wxEVT_ACTIVATE, wxActivateEventHandler(wxDialogWithHelpers::OnActivate) );
|
||||
}
|
||||
|
||||
wxDialogWithHelpers::~wxDialogWithHelpers() throw()
|
||||
|
@ -157,6 +159,11 @@ wxDialogWithHelpers::~wxDialogWithHelpers() throw()
|
|||
pxAssert( m_DialogIdents[GetId()] >= 0 );
|
||||
}
|
||||
|
||||
void wxDialogWithHelpers::OnActivate(wxActivateEvent& evt)
|
||||
{
|
||||
//evt.Skip();
|
||||
}
|
||||
|
||||
wxStaticText& wxDialogWithHelpers::AddStaticText(wxSizer& sizer, const wxString& label, int size, int alignFlags )
|
||||
{
|
||||
return wxHelpers::AddStaticTextTo( this, sizer, label, size, alignFlags );
|
||||
|
|
Loading…
Reference in New Issue