Skip to content

Commit

Permalink
Fix OSX detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
HiFiPhile committed May 12, 2024
1 parent 9840e11 commit 7106f5a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common/tusb_quirk.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ void tud_quirk_host_os_hint_desc_cb(tusb_desc_type_t desc) {
// Config Desc
// BOS Desc
// String Desc
// Linux 5.4 - 6.8
// Linux 4.14 - 6.8
// Device Desc
// BOS Desc
// Config Desc
// String Desc
// OS X
// Device Desc
// String Desc
// BOS Desc
// Config Desc
// Config Desc || BOS Desc
// BOS Desc || Config Desc
tud_quirk_host_os_t tud_quirk_host_os_hint(void) {
if (desc_req_idx < 2) {
return TUD_QUIRK_OS_HINT_UNKNOWN;
Expand All @@ -65,7 +65,7 @@ tud_quirk_host_os_t tud_quirk_host_os_hint(void) {
return TUD_QUIRK_OS_HINT_LINUX;
} else if (desc_req_buf[0] == TUSB_DESC_CONFIGURATION && desc_req_buf[1] == TUSB_DESC_BOS) {
return TUD_QUIRK_OS_HINT_WINDOWS;
} else if (desc_req_buf[0] == TUSB_DESC_STRING && desc_req_buf[1] == TUSB_DESC_BOS) {
} else if (desc_req_buf[0] == TUSB_DESC_STRING && (desc_req_buf[1] == TUSB_DESC_BOS || desc_req_buf[1] == TUSB_DESC_CONFIGURATION)) {
return TUD_QUIRK_OS_HINT_OSX;
}

Expand Down

0 comments on commit 7106f5a

Please sign in to comment.