[Hotkey] Style

This commit is contained in:
Klaus Basan
2019-11-24 19:32:44 +01:00
committed by Mat Sutcliffe
parent 9dbb441e44
commit ef4640e66f
10 changed files with 54 additions and 60 deletions

View File

@@ -76,6 +76,7 @@ namespace BlackCore
void CInputManager::processKeyCombinationChanged(const CHotkeyCombination &combination)
{
// Merge in the joystick part
// mixed on purpose, as any joystick keyboard combination is possible
CHotkeyCombination copy(combination);
copy.setJoystickButtons(m_lastCombination.getJoystickButtons());
processCombination(copy);
@@ -83,7 +84,8 @@ namespace BlackCore
void CInputManager::processButtonCombinationChanged(const CHotkeyCombination &combination)
{
// Merge in the keyboard dkeys
// Merge in the keyboard keys
// mixed on purpose, as any joystick keyboard combination is possible
CHotkeyCombination copy(combination);
copy.setKeyboardKeys(m_lastCombination.getKeyboardKeys());
processCombination(copy);
@@ -124,7 +126,7 @@ namespace BlackCore
{
m_keyboard = IKeyboard::create(this);
m_joystick = IJoystick::create(this);
connect(m_keyboard.get(), &IKeyboard::keyCombinationChanged, this, &CInputManager::processKeyCombinationChanged, Qt::QueuedConnection);
connect(m_keyboard.get(), &IKeyboard::keyCombinationChanged, this, &CInputManager::processKeyCombinationChanged, Qt::QueuedConnection);
connect(m_joystick.get(), &IJoystick::buttonCombinationChanged, this, &CInputManager::processButtonCombinationChanged, Qt::QueuedConnection);
}