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