mirror of
https://github.com/libretro/Play-.git
synced 2025-02-25 22:15:27 +00:00
Fix stability and performance issues with OSX GamePadDeviceListener.
This commit is contained in:
parent
68987dc43d
commit
7b606110b3
@ -17,8 +17,6 @@ CGamePadDeviceListener::CGamePadDeviceListener(bool filter)
|
||||
CGamePadDeviceListener::~CGamePadDeviceListener()
|
||||
{
|
||||
m_running = false;
|
||||
CFRunLoopStop(CFRunLoopGetCurrent());
|
||||
IOHIDManagerClose(m_hidManager, 0);
|
||||
if(m_thread.joinable())
|
||||
m_thread.join();
|
||||
}
|
||||
@ -344,7 +342,9 @@ void CGamePadDeviceListener::InputDeviceListenerThread()
|
||||
|
||||
IOHIDManagerOpen(m_hidManager, kIOHIDOptionsTypeNone);
|
||||
IOHIDManagerScheduleWithRunLoop(m_hidManager, CFRunLoopGetCurrent(), CFSTR("CustomLoop"));
|
||||
while(CFRunLoopRunInMode(CFSTR("CustomLoop"), 0, true) != kCFRunLoopRunStopped && m_running)
|
||||
while(CFRunLoopRunInMode(CFSTR("CustomLoop"), 1, true) != kCFRunLoopRunStopped && m_running)
|
||||
{
|
||||
}
|
||||
|
||||
IOHIDManagerClose(m_hidManager, 0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user