Kernel: Fix USB keyboard state updating with variable reports

This commit is contained in:
Bananymous 2024-07-16 00:03:00 +03:00
parent a60b460701
commit 339e8a7910
1 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,8 @@ namespace Kernel
dprintln_if(DEBUG_KEYBOARD, "Unsupported keyboard usage page {2H}", usage_page); dprintln_if(DEBUG_KEYBOARD, "Unsupported keyboard usage page {2H}", usage_page);
return; return;
} }
if (!state)
return;
if (usage >= 4 && usage < m_keyboard_state_temp.size()) if (usage >= 4 && usage < m_keyboard_state_temp.size())
m_keyboard_state_temp[usage] = state; m_keyboard_state_temp[usage] = state;
} }