Quit when failed to create quartz event tap
This commit is contained in:
parent
d5872caa7e
commit
4dc9f893c3
|
@ -203,11 +203,13 @@ OSXScreen::OSXScreen(IEventQueue* events, bool isPrimary, bool autoShowHideCurso
|
|||
|
||||
if (!m_eventTapPort) {
|
||||
LOG((CLOG_ERR "failed to create quartz event tap"));
|
||||
m_events->addEvent(Event(Event::kQuit));
|
||||
}
|
||||
|
||||
m_eventTapRLSR = CFMachPortCreateRunLoopSource(kCFAllocatorDefault, m_eventTapPort, 0);
|
||||
if (!m_eventTapRLSR) {
|
||||
LOG((CLOG_ERR "failed to create a CFRunLoopSourceRef for the quartz event tap"));
|
||||
m_events->addEvent(Event(Event::kQuit));
|
||||
}
|
||||
|
||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_eventTapRLSR, kCFRunLoopDefaultMode);
|
||||
|
|
Loading…
Reference in New Issue