From f34619dc5a38de01fa0280eec97fb471f76ac3a1 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Fri, 8 Jan 2010 15:51:31 +0000 Subject: [PATCH] Fix errant code refactoring mistake regarding wxEVT_IDLE git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2414 96395faa-99c1-11dd-bbfe-3dabce05a288 --- 3rdparty/wxWidgets/include/wx/event.h | 8 ++++---- 3rdparty/wxWidgets/src/common/event.cpp | 8 ++++---- pcsx2/gui/wxAppWithHelpers.cpp | 5 +---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/3rdparty/wxWidgets/include/wx/event.h b/3rdparty/wxWidgets/include/wx/event.h index 67a6c09439..26fab62c9f 100644 --- a/3rdparty/wxWidgets/include/wx/event.h +++ b/3rdparty/wxWidgets/include/wx/event.h @@ -260,7 +260,7 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EVENT_TYPE(wxEVT_MEASURE_ITEM, 436) DECLARE_EVENT_TYPE(wxEVT_COMPARE_ITEM, 437) DECLARE_EVENT_TYPE(wxEVT_INIT_DIALOG, 438) - DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEvt_Idle, 439) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_IDLE, 439) DECLARE_EVENT_TYPE(wxEVT_UPDATE_UI, 440) DECLARE_EVENT_TYPE(wxEVT_SIZING, 441) DECLARE_EVENT_TYPE(wxEVT_MOVING, 442) @@ -2127,7 +2127,7 @@ private: // Idle event /* - wxEvt_Idle + wxEVT_IDLE */ // Whether to always send idle events to windows, or @@ -2148,7 +2148,7 @@ class WXDLLIMPEXP_CORE wxIdleEvent : public wxEvent { public: wxIdleEvent() - : wxEvent(0, wxEvt_Idle), + : wxEvent(0, wxEVT_IDLE), m_requestMore(false) { } wxIdleEvent(const wxIdleEvent & event) @@ -3069,7 +3069,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent& EVT_JOY_ZMOVE(func) // Idle event -#define EVT_IDLE(func) wx__DECLARE_EVT0(wxEvt_Idle, wxIdleEventHandler(func)) +#define EVT_IDLE(func) wx__DECLARE_EVT0(wxEVT_IDLE, wxIdleEventHandler(func)) // Update UI event #define EVT_UPDATE_UI(winid, func) wx__DECLARE_EVT1(wxEVT_UPDATE_UI, winid, wxUpdateUIEventHandler(func)) diff --git a/3rdparty/wxWidgets/src/common/event.cpp b/3rdparty/wxWidgets/src/common/event.cpp index 9f1ca27fe3..d6518ce9c6 100644 --- a/3rdparty/wxWidgets/src/common/event.cpp +++ b/3rdparty/wxWidgets/src/common/event.cpp @@ -157,7 +157,7 @@ const wxEventType wxEVT_FIRST = 10000; const wxEventType wxEVT_USER_FIRST = wxEVT_FIRST + 2000; DEFINE_EVENT_TYPE(wxEVT_NULL) -DEFINE_EVENT_TYPE(wxEvt_Idle) +DEFINE_EVENT_TYPE(wxEVT_IDLE) DEFINE_EVENT_TYPE(wxEVT_SOCKET) #endif // !WXWIN_COMPATIBILITY_EVENT_TYPES @@ -1248,10 +1248,10 @@ bool wxEvtHandler::TryParent(wxEvent& event) { if ( wxTheApp && (this != wxTheApp) ) { - // Special case: don't pass wxEvt_Idle to wxApp, since it'll always - // swallow it. wxEvt_Idle is sent explicitly to wxApp so it will be + // Special case: don't pass wxEVT_IDLE to wxApp, since it'll always + // swallow it. wxEVT_IDLE is sent explicitly to wxApp so it will be // processed appropriately via SearchEventTable. - if ( event.GetEventType() != wxEvt_Idle ) + if ( event.GetEventType() != wxEVT_IDLE ) { if ( wxTheApp->ProcessEvent(event) ) return true; diff --git a/pcsx2/gui/wxAppWithHelpers.cpp b/pcsx2/gui/wxAppWithHelpers.cpp index 79c628cfae..92d77dc49c 100644 --- a/pcsx2/gui/wxAppWithHelpers.cpp +++ b/pcsx2/gui/wxAppWithHelpers.cpp @@ -121,11 +121,8 @@ bool wxAppWithHelpers::OnInit() Connect( pxEvt_MessageBox, pxMessageBoxEventThing (wxAppWithHelpers::OnMessageBox) ); Connect( pxEvt_Assertion, pxMessageBoxEventThing (wxAppWithHelpers::OnMessageBox) ); Connect( pxEvt_Ping, pxPingEventHandler (wxAppWithHelpers::OnPingEvent) ); -#ifdef __LINUX__ Connect( wxEVT_IDLE, wxIdleEventHandler (wxAppWithHelpers::OnIdleEvent) ); -#else - Connect( wxEvt_Idle, wxIdleEventHandler (wxAppWithHelpers::OnIdleEvent) ); -#endif + Connect( m_PingTimer.GetId(), wxEVT_TIMER, wxTimerEventHandler(wxAppWithHelpers::OnPingTimeout) ); return _parent::OnInit();