mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-10-05 10:36:39 +02:00
* Completely new assertion macros: pxAssert, pxAssertMsg, and pxFail, pxAssertDev (both which default to using a message). These replace *all* wxASSERT, DevAssert, and jASSUME varieties of macros. New macros borrow the best of all assertion worlds: MSVCRT, wxASSERT, and AtlAssume. :) * Rewrote the Console namespace as a structure called IConsoleWriter, and created several varieties of ConsoleWriters for handling different states of log and console availability (should help reduce overhead of console logging nicely). * More improvements to the PersistentThread model, using safely interlocked "Do*" style callbacks for starting and cleaning up threads. * Fixed console logs so that they're readable in Win32 notepad again (the log writer adds CRs to naked LFs). * Added AppInit.cpp -- contains constructor, destructor, OnInit, and command line parsing mess. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1950 96395faa-99c1-11dd-bbfe-3dabce05a288
58 lines
2.1 KiB
C++
58 lines
2.1 KiB
C++
/* PCSX2 - PS2 Emulator for PCs
|
|
* Copyright (C) 2002-2009 PCSX2 Dev Team
|
|
*
|
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
*
|
|
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with PCSX2.
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "Dependencies.h"
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
// wxBaseTools.h
|
|
//
|
|
// This file is meant to contain utility classes for users of the wxWidgets library.
|
|
// All classes in this file are strictly dependent on wxBase libraries only, meaning
|
|
// you don't need to include or link against wxCore (GUI) to build them. For tools
|
|
// which require wxCore, see wxGuiTools.h
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
// wxDoNotLogInThisScope
|
|
// --------------------------------------------------------------------------------------
|
|
// This class is used to disable wx's sometimes inappropriate amount of forced error logging
|
|
// during specific activities. For example, when using wxDynamicLibrary to detect the
|
|
// validity of DLLs, wx will log errors for missing symbols. (sigh)
|
|
//
|
|
// Usage: Basic auto-cleanup destructor class. Create an instance inside a scope, and
|
|
// logging will be re-enabled when scope is terminated. :)
|
|
//
|
|
class wxDoNotLogInThisScope
|
|
{
|
|
DeclareNoncopyableObject(wxDoNotLogInThisScope);
|
|
|
|
protected:
|
|
bool m_prev;
|
|
|
|
public:
|
|
wxDoNotLogInThisScope() :
|
|
m_prev( wxLog::EnableLogging( false ) )
|
|
{
|
|
}
|
|
|
|
~wxDoNotLogInThisScope()
|
|
{
|
|
wxLog::EnableLogging( m_prev );
|
|
}
|
|
};
|