Linux: Fixed compiler errors from my prev commit, along with a few verbose warnings and a compile error in SPU2-X. (note, moved Linux's define of SVN_REV macro to PrecompiledHeader.h for now, until a proper solution is implemented)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1819 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-09-13 20:56:22 +00:00
parent 4fbc2c26aa
commit de0442321f
13 changed files with 110 additions and 68 deletions

View File

@ -50,6 +50,7 @@
<Compiler>
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=yes --cflags`" />
<Add option="-DPCSX2_DEVBUILD" />
<Add option="-DPCSX2_DEVEL" />
<Add option="-DNDEBUG" />
<Add directory="../../include" />
<Add directory="../../include/Utilities" />

View File

@ -50,6 +50,7 @@
<Add option="-Wall" />
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=no --cflags`" />
<Add option="-DPCSX2_DEVBUILD" />
<Add option="-DPCSX2_DEVEL" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>

View File

@ -27,18 +27,24 @@ extern void DevAssert( bool condition, const char* msg );
// exception. Use this macro to dispose of these dangerous exceptions, and generate a
// friendly error log in their wake.
//
#define DESTRUCTOR_CATCHALL \
#define __DESTRUCTOR_CATCHALL( funcname ) \
catch( Exception::BaseException& ex ) \
{ \
Console::Error( "Unhandled BaseException in " __FUNCTION__ " (ignored!):" ); \
Console::Error( "Unhandled BaseException in %s (ignored!):", funcname ); \
Console::Error( ex.FormatDiagnosticMessage() ); \
} \
catch( std::exception& ex ) \
{ \
Console::Error( "Unhandled std::exception in " __FUNCTION__ " (ignored!):" ); \
Console::Error( "Unhandled std::exception in %s (ignored!):", funcname ); \
Console::Error( ex.what() ); \
}
#ifdef __GNUC__
# define DESTRUCTOR_CATCHALL __DESTRUCTOR_CATCHALL( __PRETTY_FUNCTION__ )
#else
# define DESTRUCTOR_CATCHALL __DESTRUCTOR_CATCHALL( __FUNCTION__ )
#endif
namespace Exception
{
// --------------------------------------------------------------------------------------

View File

@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="pcsx2_suite_2008 workspace">
<Project filename="pcsx2/Linux/pcsx2.cbp" />
<Project filename="pcsx2/Linux/pcsx2.cbp">
<Depends filename="common/build/x86emitter/x86emitter.cbp" />
<Depends filename="common/build/Utilities/Utilities.cbp" />
<Depends filename="3rdparty/zlib/zlib.cbp" />
<Depends filename="tools/bin2cpp/bin2cpp.cbp" />
</Project>
<Project filename="common/build/x86emitter/x86emitter.cbp" />
<Project filename="common/build/Utilities/Utilities.cbp" />
<Project filename="3rdparty/SoundTouch/SoundTouch.cbp" />

View File

@ -45,6 +45,7 @@
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=yes --cflags`" />
<Add option="-DNDEBUG" />
<Add option="-DPCSX2_DEVBUILD" />
<Add option="-DPCSX2_DEVEL" />
</Compiler>
<ResourceCompiler>
<Add directory="$(ProjectRootDir)/gui" />
@ -303,16 +304,19 @@
<Unit filename="../gui/Resources/AppIcon16.h" />
<Unit filename="../gui/Resources/AppIcon16.png">
<Option compile="1" />
<Option weight="0" />
<Option compiler="gcc" use="1" buildCommand="$(SvnRootDir)/tools/bin2app.sh $(SvnRootDir) $file" />
</Unit>
<Unit filename="../gui/Resources/AppIcon32.h" />
<Unit filename="../gui/Resources/AppIcon32.png">
<Option compile="1" />
<Option weight="0" />
<Option compiler="gcc" use="1" buildCommand="$(SvnRootDir)/tools/bin2app.sh $(SvnRootDir) $file" />
</Unit>
<Unit filename="../gui/Resources/AppIcon64.h" />
<Unit filename="../gui/Resources/AppIcon64.png">
<Option compile="1" />
<Option weight="0" />
<Option compiler="gcc" use="1" buildCommand="$(SvnRootDir)/tools/bin2app.sh $(SvnRootDir) $file" />
</Unit>
<Unit filename="../gui/Resources/BackgroundLogo.h" />

View File

@ -712,7 +712,6 @@ PluginManager::~PluginManager()
Shutdown();
}
DESTRUCTOR_CATCHALL
// All library unloading done automatically.
}

View File

@ -282,7 +282,7 @@ extern PluginManagerBase& GetPluginManager();
// Hack to expose internal MemoryCard plugin:
extern "C" extern const PS2E_LibraryAPI* FileMcd_InitAPI( const PS2E_EmulatorInfo* emuinfo );
extern "C" const PS2E_LibraryAPI* FileMcd_InitAPI( const PS2E_EmulatorInfo* emuinfo );
// Per ChickenLiver, this is being used to pass the GS plugins window handle to the Pad plugins.
// So a rename to pDisplay is in the works, but it will not, in fact, be removed.

View File

@ -90,6 +90,12 @@ typedef int BOOL;
#include "Utilities/General.h"
#include "x86emitter/tools.h"
// Linux isn't set up for svn version numbers yet.
#ifdef __LINUX__
# define SVN_REV 0
# define SVN_MODS 0
#endif
//////////////////////////////////////////////////////////////////////////////////////////
// Compiler/OS specific macros and defines -- Begin Section

View File

@ -279,26 +279,16 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title):
wxString wintitle;
if( PCSX2_VersionLo & 1 )
{
#ifdef __LINUX__
// Linux isn't set up for svn version numbers yet.
wintitle.Printf( _("PCSX2 %d.%d.%d (svn) %s"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
wxString::FromUTF8(__DATE__).c_str() );
#else
// Odd versions: beta / development editions, which feature revision number and compile date.
wintitle.Printf( _("PCSX2 %d.%d.%d.%d%s (svn) %s"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
SVN_REV, SVN_MODS ? L"m" : wxEmptyString, wxString::FromUTF8(__DATE__).c_str() );
#endif
}
else
{
#ifdef __LINUX__
wintitle.Printf( _("PCSX2 %d.%d.%d"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo);
#else
// evens: stable releases, with a simpler title.
wintitle.Printf( _("PCSX2 %d.%d.%d %s"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
SVN_MODS ? _("(modded)") : wxEmptyString
);
#endif
}
SetTitle( wintitle );

View File

@ -2,9 +2,12 @@
#ifndef _BASETYPES_H_
#define _BASETYPES_H_
#include "PS2Edefs.h"
//system defines
#ifdef __LINUX__
#include <gtk/gtk.h>
# undef __LINUX__ // supress gtk's warnings on redefinition
# include <gtk/gtk.h>
#else
# define WINVER 0x0501
# define _WIN32_WINNT 0x0501
@ -27,8 +30,6 @@
using std::string;
using std::wstring;
#include "PS2Edefs.h"
//////////////////////////////////////////////////////////////////////////
// Override Win32 min/max macros with the STL's type safe and macro
// free varieties (much safer!)

View File

@ -264,7 +264,7 @@ struct Stereo51Out16DplII
s32 VL=(ValL>>4) * Cfl; //16.12
s32 VR=(ValR>>4) * Cfr;
s32 SC = (VL-VR)>>15;
//s32 SC = (VL-VR)>>15;
SL = (((VR/148 - VL/209)>>4)*Cfr)>>8;
SR = (((VR/209 - VL/148)>>4)*Cfl)>>8;
@ -283,7 +283,7 @@ struct Stereo51Out16DplII
int AddCX = (C * AddCLR)>>8;
Left = (((L * GainL ))>>8) + AddCX;
Right = (((R * GainL ))>>8) + AddCX;
Right = (((R * GainR ))>>8) + AddCX;
Center = (((C * GainC ))>>8);
LFE = (((SUB * GainLFE))>>8);
LeftBack = (((SL * GainSL ))>>8);

View File

@ -144,10 +144,10 @@ extern short *_spu2mem;
extern PcmCacheEntry* pcm_cache_data;
extern s16 __forceinline * __fastcall GetMemPtr(u32 addr);
extern s16 __forceinline __fastcall spu2M_Read( u32 addr );
extern void __inline __fastcall spu2M_Write( u32 addr, s16 value );
extern void __inline __fastcall spu2M_Write( u32 addr, u16 value );
extern s16* __fastcall GetMemPtr(u32 addr);
extern s16 __fastcall spu2M_Read( u32 addr );
extern void __fastcall spu2M_Write( u32 addr, s16 value );
extern void __fastcall spu2M_Write( u32 addr, u16 value );
#define spu2Rs16(mmem) (*(s16 *)((s8 *)spu2regs + ((mmem) & 0x1fff)))
#define spu2Ru16(mmem) (*(u16 *)((s8 *)spu2regs + ((mmem) & 0x1fff)))

View File

@ -5,6 +5,11 @@
<Option title="bin2cpp" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Option show_notes="0">
<notes>
<![CDATA[Built Targets: Debug and Devel builds are carbon copies of Release. Code::Blocks won't build bin2cpp automatically as a dependency of PCSX2 unless it has matching debug/devel configurations (that is, the depdendency only builds in Release modes, if the dependency only has a release target). There's no point in having debug/devel builds other than that.]]>
</notes>
</Option>
<Build>
<Target title="Release">
<Option output="../bin/bin2cpp" prefix_auto="1" extension_auto="1" />
@ -18,6 +23,30 @@
<Add option="-s" />
</Linker>
</Target>
<Target title="Debug">
<Option output="../bin/bin2cpp" prefix_auto="1" extension_auto="1" />
<Option object_output="./.objs/release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
<Target title="Devel">
<Option output="../bin/bin2cpp" prefix_auto="1" extension_auto="1" />
<Option object_output="./.objs/release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />