diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index a7a4500cfe..2c2a56eaaf 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -285,7 +285,7 @@ EVT_SIZE(CFrame::OnResize) EVT_MOVE(CFrame::OnMove) EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, CFrame::OnGameListCtrl_ItemActivated) EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage) -#if wxUSE_TIMER && defined _WIN32 +#if wxUSE_TIMER EVT_TIMER(wxID_ANY, CFrame::OnTimer) #endif @@ -324,8 +324,10 @@ CFrame::CFrame(wxFrame* parent, , bRenderToMain(false), bFloatLogWindow(false), bFloatConsoleWindow(false) , HaveLeds(false), HaveSpeakers(false) , m_bControlsCreated(false), bNoWiimoteMsg(false), m_StopDlg(NULL) - #if wxUSE_TIMER && defined _WIN32 + #if wxUSE_TIMER + #ifdef _WIN32 , m_fLastClickTime(0), m_iLastMotionTime(0), LastMouseX(0), LastMouseY(0) + #endif , m_timer(this) #endif @@ -348,7 +350,7 @@ CFrame::CFrame(wxFrame* parent, } // Create timer - #if wxUSE_TIMER && defined _WIN32 + #if wxUSE_TIMER int TimesPerSecond = 10; // We don't need more than this m_timer.Start( floor((double)(1000 / TimesPerSecond)) ); #endif @@ -506,7 +508,7 @@ CFrame::~CFrame() cdio_free_device_list(drives); /* The statbar sample has this so I add this to, but I guess timer will be deleted after this anyway */ - #if wxUSE_TIMER && defined _WIN32 + #if wxUSE_TIMER if (m_timer.IsRunning()) m_timer.Stop(); #endif @@ -612,6 +614,18 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) } #endif +void CFrame::OnTimer(wxTimerEvent& WXUNUSED(event)) +{ +#ifdef _WIN32 + Update(); +#else + // Process events in linux. Primarily to update the statusbar text. + // This should be unnecessary if we ever get WXGL and render to main working + if (wxGetApp().Pending()) + wxGetApp().ProcessPendingEvents(); +#endif +} + void CFrame::OnHostMessage(wxCommandEvent& event) { switch (event.GetId()) diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index a16050408e..332545c567 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -337,14 +337,17 @@ class CFrame : public wxFrame void BootGame(const std::string& filename); // Double click and mouse move options - #if wxUSE_TIMER && defined _WIN32 +#if wxUSE_TIMER + #ifdef _WIN32 double m_fLastClickTime, m_iLastMotionTime; int LastMouseX, LastMouseY; - void Update(); - void OnTimer(wxTimerEvent& WXUNUSED(event)) { Update(); } - wxTimer m_timer; - #endif + void Update(); + #endif + // Used in linux to process command events + void OnTimer(wxTimerEvent& WXUNUSED(event)); + wxTimer m_timer; +#endif // Event table DECLARE_EVENT_TABLE(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index 7fed4efabe..a05754a9b2 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -567,7 +567,6 @@ void OpenGL_Update() // Close plugin void OpenGL_Shutdown() { - printf("Deleting\n"); #if defined(USE_WX) && USE_WX delete GLWin.glCanvas; delete GLWin.frame;