input: fix keyboard leds with multiple keyboards (#7079)
This commit is contained in:
parent
bc86afea7e
commit
9b6ae4f77b
3 changed files with 34 additions and 16 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue