From ff06fe5494a434a3d4a5ca4bedfd1e6e1b341b27 Mon Sep 17 00:00:00 2001 From: Liz Date: Tue, 8 Apr 2025 11:16:01 -0400 Subject: [PATCH] Revert "remove returns" This reverts commit f9c0a1628d75b2233e985aa03f3599a396978997. --- MCUME_pico2/display/emuapi.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MCUME_pico2/display/emuapi.cpp b/MCUME_pico2/display/emuapi.cpp index 146bd96..3d21d0e 100644 --- a/MCUME_pico2/display/emuapi.cpp +++ b/MCUME_pico2/display/emuapi.cpp @@ -1282,12 +1282,14 @@ void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* desc_re gamepad_addr = dev_addr; gamepad_instance = instance; tuh_hid_receive_report(dev_addr, instance); + return true; } // Check for keyboard (existing code will handle this) uint8_t const itf_protocol = tuh_hid_interface_protocol(dev_addr, instance); if (itf_protocol == HID_ITF_PROTOCOL_KEYBOARD) { printf("USB keyboard detected\r\n"); + return true; } // Check for generic gamepad/joystick @@ -1307,9 +1309,11 @@ void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* desc_re gamepad_addr = dev_addr; gamepad_instance = instance; tuh_hid_receive_report(dev_addr, instance); + return true; } // Not a supported device + return false; } // Invoked when device with hid interface is unmounted