X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b46b1d59d6f69ad80dcf5955375578a6504d100a..5a1e0e91a1ca5ec98b0eeb335cda757d1261ed08:/src/unix/evtloopunix.cpp diff --git a/src/unix/evtloopunix.cpp b/src/unix/evtloopunix.cpp index 1aadf8f498..5bd8b1050f 100644 --- a/src/unix/evtloopunix.cpp +++ b/src/unix/evtloopunix.cpp @@ -19,7 +19,7 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/evtloop.h" +#if wxUSE_CONSOLE_EVENTLOOP #ifndef WX_PRECOMP #include "wx/app.h" @@ -27,9 +27,10 @@ #endif #include +#include "wx/evtloop.h" #include "wx/thread.h" #include "wx/module.h" -#include "wx/generic/private/timer.h" +#include "wx/unix/private/timer.h" #include "wx/unix/private/epolldispatcher.h" #include "wx/private/selectdispatcher.h" @@ -124,15 +125,9 @@ wxConsoleEventLoop::wxConsoleEventLoop() return; } -#ifdef HAVE_SYS_EPOLL_H - m_dispatcher = wxEpollDispatcher::Get(); + m_dispatcher = wxFDIODispatcher::Get(); if ( !m_dispatcher ) -#endif // HAVE_SYS_EPOLL_H - { - m_dispatcher = wxSelectDispatcher::Get(); - } - - wxCHECK_RET( m_dispatcher, _T("failed to create IO dispatcher") ); + return; m_dispatcher->RegisterFD ( @@ -140,7 +135,7 @@ wxConsoleEventLoop::wxConsoleEventLoop() &m_wakeupPipe, wxFDIO_INPUT ); -}; +} //----------------------------------------------------------------------------- // events dispatch and loop handling @@ -180,7 +175,7 @@ void wxConsoleEventLoop::OnNextIteration() timeout = wxFDIODispatcher::TIMEOUT_INFINITE; } - m_dispatcher->RunLoop(timeout); + m_dispatcher->Dispatch(timeout); #if wxUSE_TIMER wxTimerScheduler::Get().NotifyExpired(); @@ -190,3 +185,4 @@ void wxConsoleEventLoop::OnNextIteration() wxTheApp->CheckSignal(); } +#endif // wxUSE_CONSOLE_EVENTLOOP