From 9b5eee6ed7d8fd2433a44afdbeeb44c0cf345187 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 31 Jul 2008 13:04:02 +0000 Subject: [PATCH] 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 --- src/osx/core/timer.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/osx/core/timer.cpp b/src/osx/core/timer.cpp index 2a18cd7ff3..3f55f8895c 100644 --- a/src/osx/core/timer.cpp +++ b/src/osx/core/timer.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: sec/osx/core/timer.cpp +// Name: src/osx/core/timer.cpp // Purpose: wxTimer implementation using CoreFoundation // Author: Stefan Csomor // 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")); - CFRunLoopAddTimer( CFRunLoopGetMain() // or CFRunLoopGetCurrent() ? - , m_info->m_timerRef, kCFRunLoopCommonModes) ; + CFRunLoopRef runLoop = 0; +#if wxOSX_USE_IPHONE + runLoop = CFRunLoopGetMain(); +#else + runLoop = CFRunLoopGetCurrent(); +#endif + CFRunLoopAddTimer( runLoop, m_info->m_timerRef, kCFRunLoopCommonModes) ; return true; -- 2.45.2