From 30dd291d3d616cc139fc9c1bafc99e8dd3467183 Mon Sep 17 00:00:00 2001 From: CarterLi Date: Fri, 16 Jun 2023 23:35:30 +0800 Subject: [PATCH] Gamepad (FreeBSD): fix detection --- src/detection/gamepad/gamepad_bsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/detection/gamepad/gamepad_bsd.c b/src/detection/gamepad/gamepad_bsd.c index 95b5b1769..49f49bf58 100644 --- a/src/detection/gamepad/gamepad_bsd.c +++ b/src/detection/gamepad/gamepad_bsd.c @@ -28,7 +28,8 @@ const char* ffDetectGamepad(FF_MAYBE_UNUSED const FFinstance* instance, FFlist* struct hid_item hItem; while (hid_get_item(hData, &hItem) > 0) { - switch (HID_PAGE(hItem.usage)) + if (HID_PAGE(hItem.usage) != 1) continue; + switch (HID_USAGE(hItem.usage)) { case 1: // FreeBSD returns 1 for my Pro Controller for some reason case 5: