- if ( !wxTheApp )
- return false;
-
- wxMacAutoreleasePool autoreleasepool;
-
-/*
- if(UIEvent *event = [[UIApplication sharedApplication]
- nextEventMatchingMask:NSAnyEventMask
- untilDate:[NSDate dateWithTimeIntervalSinceNow: m_sleepTime]
- inMode:NSDefaultRunLoopMode
- dequeue: YES])
- {
- m_sleepTime = 0.0;
- [[UIApplication sharedApplication] sendEvent: event];
- }
- else
-*/
- {
- if ( wxTheApp->ProcessIdle() )
- m_sleepTime = 0.0 ;
- else
- {
- m_sleepTime = 1.0;
-#if wxUSE_THREADS
- wxMutexGuiLeave();
- wxMilliSleep(20);
- wxMutexGuiEnter();
-#endif
- }
- }