Attempt for the GCC 4.3 compilation errors introduced in r2063/2064, by selectively disabling __fastcall for the functions being used as listeners... hope it works. >_<

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2071 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-10-24 22:32:25 +00:00
parent 1cd5e52023
commit 984e79ae03
6 changed files with 22 additions and 13 deletions

View File

@ -19,6 +19,15 @@
class wxCommandEvent; class wxCommandEvent;
// __evt_fastcall : Work-around for a GCC 4.3 compilation bug. The templated FuncType
// throws type mismatches if we have a __fastcall qualifier. >_< --air
#if defined( __GNUC__ ) && (__GNUC__ < 4 ) || ((__GNUC__ == 4) && ( __GNUC_MINOR__ <= 3 ))
# define __evt_fastcall
#else
# define __evt_fastcall
#endif
// -------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------
// EventListener< typename EvtType > // EventListener< typename EvtType >
// -------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------
@ -26,7 +35,7 @@ class wxCommandEvent;
template< typename EvtType > template< typename EvtType >
struct EventListener struct EventListener
{ {
typedef void __fastcall FuncType( void* object, typename EvtType& evt ); typedef void __evt_fastcall FuncType( void* object, EvtType& evt );
void* object; void* object;
FuncType* OnEvent; FuncType* OnEvent;

View File

@ -574,7 +574,7 @@ void memClearPageAddr(u32 vaddr)
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// PS2 Memory Init / Reset / Shutdown // PS2 Memory Init / Reset / Shutdown
static void __fastcall mmap_OnPageFault( void* basemem, PageFaultInfo& info ); static void __evt_fastcall mmap_OnPageFault( void* basemem, PageFaultInfo& info );
static const uint m_allMemSize = static const uint m_allMemSize =
Ps2MemSize::Rom + Ps2MemSize::Rom1 + Ps2MemSize::Rom2 + Ps2MemSize::ERom + Ps2MemSize::Rom + Ps2MemSize::Rom1 + Ps2MemSize::Rom2 + Ps2MemSize::ERom +
@ -894,7 +894,7 @@ static __forceinline void mmap_ClearCpuBlock( uint offset )
Cpu->Clear( m_PageProtectInfo[rampage].ReverseRamMap, 0x400 ); Cpu->Clear( m_PageProtectInfo[rampage].ReverseRamMap, 0x400 );
} }
static void __fastcall mmap_OnPageFault( void* basemem, PageFaultInfo& info ) static void __evt_fastcall mmap_OnPageFault( void* basemem, PageFaultInfo& info )
{ {
// get bad virtual address // get bad virtual address
uptr offset = info.addr - (uptr)basemem; uptr offset = info.addr - (uptr)basemem;

View File

@ -34,7 +34,7 @@ int sys_resume_lock = 0;
static FnType_OnThreadComplete* Callback_FreezeFinished = NULL; static FnType_OnThreadComplete* Callback_FreezeFinished = NULL;
static void __fastcall StateThread_OnAppStatus( void* thr, AppEventType& stat ) static void __evt_fastcall StateThread_OnAppStatus( void* thr, AppEventType& stat )
{ {
if( (thr == NULL) || (stat != AppStatus_Exiting) ) return; if( (thr == NULL) || (stat != AppStatus_Exiting) ) return;
((PersistentThread*)thr)->Cancel(); ((PersistentThread*)thr)->Cancel();

View File

@ -250,7 +250,7 @@ void Pcsx2App::HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEvent&
} }
} }
static void __fastcall OnStateSaveFinished( void* obj, wxCommandEvent& evt ) static void __evt_fastcall OnStateSaveFinished( void* obj, wxCommandEvent& evt )
{ {
if( evt.GetInt() == CoreStatus_Resumed ) if( evt.GetInt() == CoreStatus_Resumed )
{ {

View File

@ -255,28 +255,28 @@ void MainEmuFrame::InitLogBoxPosition( AppConfig::ConsoleLogOptions& conf )
} }
} }
void __fastcall MainEmuFrame::OnCoreThreadStatusChanged( void* obj, wxCommandEvent& evt ) void __evt_fastcall MainEmuFrame::OnCoreThreadStatusChanged( void* obj, wxCommandEvent& evt )
{ {
if( obj == NULL ) return; if( obj == NULL ) return;
MainEmuFrame* mframe = (MainEmuFrame*)obj; MainEmuFrame* mframe = (MainEmuFrame*)obj;
mframe->ApplyCoreStatus(); mframe->ApplyCoreStatus();
} }
void __fastcall MainEmuFrame::OnCorePluginStatusChanged( void* obj, wxCommandEvent& evt ) void __evt_fastcall MainEmuFrame::OnCorePluginStatusChanged( void* obj, wxCommandEvent& evt )
{ {
if( obj == NULL ) return; if( obj == NULL ) return;
MainEmuFrame* mframe = (MainEmuFrame*)obj; MainEmuFrame* mframe = (MainEmuFrame*)obj;
mframe->ApplyCoreStatus(); mframe->ApplyCoreStatus();
} }
void __fastcall MainEmuFrame::OnSettingsApplied( void* obj, int& evt ) void __evt_fastcall MainEmuFrame::OnSettingsApplied( void* obj, int& evt )
{ {
if( obj == NULL ) return; if( obj == NULL ) return;
MainEmuFrame* mframe = (MainEmuFrame*)obj; MainEmuFrame* mframe = (MainEmuFrame*)obj;
mframe->ApplySettings(); mframe->ApplySettings();
} }
void __fastcall MainEmuFrame::OnSettingsLoadSave( void* obj, IniInterface& evt ) void __evt_fastcall MainEmuFrame::OnSettingsLoadSave( void* obj, IniInterface& evt )
{ {
if( obj == NULL ) return; if( obj == NULL ) return;
MainEmuFrame* mframe = (MainEmuFrame*)obj; MainEmuFrame* mframe = (MainEmuFrame*)obj;

View File

@ -85,10 +85,10 @@ public:
void ReloadRecentLists(); void ReloadRecentLists();
protected: protected:
static void __fastcall OnCoreThreadStatusChanged( void* obj, wxCommandEvent& evt ); static void __evt_fastcall OnCoreThreadStatusChanged( void* obj, wxCommandEvent& evt );
static void __fastcall OnCorePluginStatusChanged( void* obj, wxCommandEvent& evt ); static void __evt_fastcall OnCorePluginStatusChanged( void* obj, wxCommandEvent& evt );
static void __fastcall OnSettingsApplied( void* obj, int& evt ); static void __evt_fastcall OnSettingsApplied( void* obj, int& evt );
static void __fastcall OnSettingsLoadSave( void* obj, IniInterface& evt ); static void __evt_fastcall OnSettingsLoadSave( void* obj, IniInterface& evt );
void LoadSaveRecentIsoList( IniInterface& conf ); void LoadSaveRecentIsoList( IniInterface& conf );
void ApplySettings(); void ApplySettings();