input: list actual nodes instead of button ids

This commit is contained in:
Megamouse 2023-05-21 14:54:05 +02:00
parent 1a98682ea0
commit fc76d2df38
6 changed files with 22 additions and 22 deletions

View file

@ -92,9 +92,9 @@ void usb_device_buzz::interrupt_transfer(u32 buf_size, u8* buf, u32 /*endpoint*/
continue;
}
if (const auto btn = cfg->find_button(button.m_offset, button.m_outKeyCode))
if (const auto btn = cfg->find_button(button.m_offset, button.m_outKeyCode); btn.has_value() && btn.value())
{
switch (btn.value())
switch (btn.value()->btn_id())
{
case buzz_btn::red:
buf[2 + (0 + 5 * index) / 8] |= 1 << ((0 + 5 * index) % 8); // Red