input: fix keyboard leds with multiple keyboards (#7079)

This commit is contained in:
Sungyoon Cho
2024-07-28 19:46:38 +09:00
committed by GitHub
parent bc86afea7e
commit 9b6ae4f77b
3 changed files with 34 additions and 16 deletions

View File

@@ -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) {