21 #include "../../SDL_internal.h"
23 #if SDL_VIDEO_DRIVER_UIKIT
25 #include "../../events/SDL_events_c.h"
31 #import <Foundation/Foundation.h>
33 static BOOL UIKit_EventPumpEnabled = YES;
38 UIKit_EventPumpEnabled =
enabled;
44 if (!UIKit_EventPumpEnabled) {
54 const CFTimeInterval seconds = 0.000002;
59 result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, seconds,
TRUE);
60 }
while (
result == kCFRunLoopRunHandledSource);
64 result = CFRunLoopRunInMode((CFStringRef)UITrackingRunLoopMode, seconds,
TRUE);
65 }
while(
result == kCFRunLoopRunHandledSource);
68 #if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
69 UIKit_GL_RestoreCurrentContext();