OSXTimer for all variants (sorry Vaclav, should be about the last split comit ..)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: sec/osx/core/timer.cpp
|
// Name: src/osx/core/timer.cpp
|
||||||
// Purpose: wxTimer implementation using CoreFoundation
|
// Purpose: wxTimer implementation using CoreFoundation
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -88,8 +88,13 @@ bool wxOSXTimerImpl::Start( int milliseconds, bool mode )
|
|||||||
|
|
||||||
wxASSERT_MSG( m_info->m_timerRef != NULL, wxT("unable to create timer"));
|
wxASSERT_MSG( m_info->m_timerRef != NULL, wxT("unable to create timer"));
|
||||||
|
|
||||||
CFRunLoopAddTimer( CFRunLoopGetMain() // or CFRunLoopGetCurrent() ?
|
CFRunLoopRef runLoop = 0;
|
||||||
, m_info->m_timerRef, kCFRunLoopCommonModes) ;
|
#if wxOSX_USE_IPHONE
|
||||||
|
runLoop = CFRunLoopGetMain();
|
||||||
|
#else
|
||||||
|
runLoop = CFRunLoopGetCurrent();
|
||||||
|
#endif
|
||||||
|
CFRunLoopAddTimer( runLoop, m_info->m_timerRef, kCFRunLoopCommonModes) ;
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user