Micro-optimization of cocoa event polling
This commit is contained in:
parent
1d9f73adec
commit
70c9c058e2
@ -1791,13 +1791,13 @@ void _glfwPlatformPollEvents(void)
|
||||
for (;;)
|
||||
{
|
||||
NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny
|
||||
untilDate:[NSDate distantPast]
|
||||
untilDate:nil
|
||||
inMode:NSDefaultRunLoopMode
|
||||
dequeue:YES];
|
||||
if (event == nil)
|
||||
break;
|
||||
|
||||
[NSApp sendEvent:event];
|
||||
if ([event type] != NSEventTypeApplicationDefined) [NSApp sendEvent:event];
|
||||
}
|
||||
|
||||
[_glfw.ns.autoreleasePool drain];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user