2009-04-28 20:26:43 +00:00
|
|
|
#ifndef PCSX2_PRECOMPILED_HEADER
|
|
|
|
#define PCSX2_PRECOMPILED_HEADER
|
|
|
|
|
2009-07-12 00:55:12 +00:00
|
|
|
//#pragma once // no dice, causes problems in GCC PCH (which doesn't really work very well
|
2009-03-05 20:06:38 +00:00
|
|
|
|
2009-08-31 03:47:05 +00:00
|
|
|
// Disable some pointless warnings...
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
# pragma warning(disable:4250) //'class' inherits 'method' via dominance
|
|
|
|
# pragma warning(disable:4996) //ignore the stricmp deprecated warning
|
|
|
|
#endif
|
|
|
|
|
2009-03-05 20:06:38 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
2009-07-11 08:31:38 +00:00
|
|
|
// Define PCSX2's own i18n helpers. These override the wxWidgets helpers and provide
|
|
|
|
// additional functionality.
|
|
|
|
//
|
|
|
|
#define WXINTL_NO_GETTEXT_MACRO
|
|
|
|
#undef _
|
|
|
|
#define _(s) pxGetTranslation(_T(s))
|
2009-02-09 21:15:56 +00:00
|
|
|
|
2009-07-11 08:31:38 +00:00
|
|
|
// macro provided for tagging translation strings, without actually running them through the
|
|
|
|
// translator (which the _() does automatically, and sometimes we don't want that). This is
|
|
|
|
// a shorthand replacement for wxTRANSLATE.
|
|
|
|
#define wxLt(a) (a)
|
2009-03-05 20:06:38 +00:00
|
|
|
|
2009-03-01 03:30:19 +00:00
|
|
|
#define NOMINMAX // Disables other libs inclusion of their own min/max macros (we use std instead)
|
|
|
|
|
2009-04-02 11:30:23 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Welcome wxWidgets to the party!
|
|
|
|
|
|
|
|
#include <wx/string.h>
|
|
|
|
#include <wx/tokenzr.h>
|
|
|
|
#include <wx/gdicmn.h> // for wxPoint/wxRect stuff
|
2009-04-27 02:04:31 +00:00
|
|
|
#include <wx/intl.h>
|
|
|
|
#include <wx/log.h>
|
|
|
|
#include <wx/filename.h>
|
2009-04-02 11:30:23 +00:00
|
|
|
|
2009-03-05 20:06:38 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
2009-02-09 21:15:56 +00:00
|
|
|
// Include the STL junk that's actually handy.
|
|
|
|
|
2009-04-07 21:54:50 +00:00
|
|
|
#include <stdexcept>
|
2009-02-09 21:15:56 +00:00
|
|
|
#include <algorithm>
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
2009-10-07 20:50:39 +00:00
|
|
|
#include <list>
|
2010-03-06 09:22:56 +00:00
|
|
|
#include <deque>
|
2009-02-09 21:15:56 +00:00
|
|
|
#include <sstream>
|
|
|
|
#include <cstring> // string.h under c++
|
|
|
|
#include <cstdio> // stdio.h under c++
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
// ... and include some ANSI/POSIX C libs that are useful too, just for good measure.
|
|
|
|
// (these compile lightning fast with or without PCH, but they never change so
|
|
|
|
// might as well add them here)
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
|
2009-07-11 08:31:38 +00:00
|
|
|
|
2009-02-09 21:15:56 +00:00
|
|
|
using std::string; // we use it enough, so bring it into the global namespace.
|
2009-03-01 03:30:19 +00:00
|
|
|
using std::min;
|
|
|
|
using std::max;
|
2009-02-09 21:15:56 +00:00
|
|
|
|
2009-02-28 20:55:53 +00:00
|
|
|
typedef int BOOL;
|
|
|
|
|
2009-04-27 02:04:31 +00:00
|
|
|
#undef TRUE
|
|
|
|
#undef FALSE
|
|
|
|
#define TRUE 1
|
|
|
|
#define FALSE 0
|
|
|
|
|
2009-03-05 20:06:38 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Begin Pcsx2 Includes: Add items here that are local to Pcsx2 but stay relatively
|
2009-04-02 11:30:23 +00:00
|
|
|
// unchanged for long periods of time, or happen to be used by almost everything, so they
|
|
|
|
// need a full recompile anyway, when modified (etc)
|
2009-03-05 20:06:38 +00:00
|
|
|
|
|
|
|
#include "zlib/zlib.h"
|
2009-04-29 11:47:05 +00:00
|
|
|
#include "Pcsx2Defs.h"
|
2009-07-12 00:55:12 +00:00
|
|
|
#include "i18n.h"
|
Lots of new code maintenance stuffs:
* 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
2009-10-04 08:27:27 +00:00
|
|
|
|
|
|
|
#include "Utilities/Assertions.h"
|
2009-12-03 15:51:39 +00:00
|
|
|
#include "Utilities/FixedPointTypes.h"
|
2009-08-20 14:34:48 +00:00
|
|
|
#include "Utilities/wxBaseTools.h"
|
2009-09-16 17:23:02 +00:00
|
|
|
#include "Utilities/ScopedPtr.h"
|
2009-09-12 01:03:44 +00:00
|
|
|
#include "Utilities/Path.h"
|
2009-07-03 00:49:40 +00:00
|
|
|
#include "Utilities/Console.h"
|
|
|
|
#include "Utilities/Exceptions.h"
|
|
|
|
#include "Utilities/MemcpyFast.h"
|
|
|
|
#include "Utilities/General.h"
|
|
|
|
#include "x86emitter/tools.h"
|
2009-03-05 20:06:38 +00:00
|
|
|
|
2009-11-02 07:43:51 +00:00
|
|
|
#include "Config.h"
|
|
|
|
|
2009-09-13 20:56:22 +00:00
|
|
|
// Linux isn't set up for svn version numbers yet.
|
|
|
|
#ifdef __LINUX__
|
|
|
|
# define SVN_REV 0
|
|
|
|
# define SVN_MODS 0
|
|
|
|
#endif
|
|
|
|
|
2009-07-14 06:18:52 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
2009-02-09 21:15:56 +00:00
|
|
|
// Compiler/OS specific macros and defines -- Begin Section
|
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
|
|
|
|
# define strnicmp _strnicmp
|
|
|
|
# define stricmp _stricmp
|
|
|
|
|
|
|
|
#else // must be GCC...
|
|
|
|
|
|
|
|
# include <sys/types.h>
|
|
|
|
# include <sys/timeb.h>
|
|
|
|
|
|
|
|
// Definitions added Feb 16, 2006 by efp
|
|
|
|
# ifndef __declspec
|
|
|
|
# define __declspec(x)
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifndef strnicmp
|
|
|
|
# define strnicmp strncasecmp
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifndef stricmp
|
|
|
|
# define stricmp strcasecmp
|
|
|
|
# endif
|
|
|
|
|
|
|
|
#endif // end GCC/Linux stuff
|
|
|
|
|
2009-07-12 00:55:12 +00:00
|
|
|
#endif
|