diff options
| author | Sungyoon Cho <sungyoon@sungyooncho.dev> | 2024-07-28 19:46:38 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-28 11:46:38 +0100 |
| commit | 9b6ae4f77b95fef271c2e21abba5e05b4cc47719 (patch) | |
| tree | 6ffe52a271da61803684009ae6697f8ad5bb1b3b /src/managers/input/InputManager.cpp | |
| parent | bc86afea7e177a7ad4335737417fc0e468698dc4 (diff) | |
input: fix keyboard leds with multiple keyboards (#7079)
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 619bfab7..014de40a 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -1265,7 +1265,14 @@ void CInputManager::updateKeyboardsLeds(SP<IKeyboard> pKeyboard) { if (!pKeyboard) return; - pKeyboard->updateLEDs(); + std::optional<uint32_t> leds = pKeyboard->getLEDs(); + + if (!leds.has_value()) + return; + + for (auto& k : m_vKeyboards) { + k->updateLEDs(leds.value()); + } } void CInputManager::onKeyboardKey(std::any event, SP<IKeyboard> pKeyboard) { |
