mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
Decouple system keyboard/joystick events from connected actions
The Mac OS/X event loop complained that system event processing took too much time and disabled event taps. This commit speeds up system event handling by connecting CInputManager with a queued connection. This calls all (potentially expensive) hotkey actions asynchronously.
This commit is contained in:
committed by
Mathew Sutcliffe
parent
9515109719
commit
7f9c99ca7a
@@ -28,8 +28,8 @@ namespace BlackCore
|
||||
m_keyboard(IKeyboard::create(this)),
|
||||
m_joystick(IJoystick::create(this))
|
||||
{
|
||||
connect(m_keyboard.get(), &IKeyboard::keyCombinationChanged, this, &CInputManager::ps_processKeyCombinationChanged);
|
||||
connect(m_joystick.get(), &IJoystick::buttonCombinationChanged, this, &CInputManager::ps_processButtonCombinationChanged);
|
||||
connect(m_keyboard.get(), &IKeyboard::keyCombinationChanged, this, &CInputManager::ps_processKeyCombinationChanged, Qt::QueuedConnection);
|
||||
connect(m_joystick.get(), &IJoystick::buttonCombinationChanged, this, &CInputManager::ps_processButtonCombinationChanged, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
CInputManager *CInputManager::instance()
|
||||
|
||||
Reference in New Issue
Block a user