mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Gamepad: report joystick too
This commit is contained in:
@@ -31,8 +31,9 @@ const char* ffDetectGamepad(FFlist* devices /* List of FFGamepadDevice */)
|
||||
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:
|
||||
case 1: // Pointer. FreeBSD returns 1 for my Pro Controller for some reason
|
||||
case 4: // Joystick
|
||||
case 5: // Gamepad
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
|
||||
@@ -87,7 +87,7 @@ const char* ffDetectGamepad(FFlist* devices /* List of FFGamepadDevice */)
|
||||
if (GetRawInputDeviceInfoW(hDevice, RIDI_DEVICEINFO, &rdi, &rdiSize) == (UINT) -1)
|
||||
continue;
|
||||
|
||||
if (rdi.hid.usUsagePage != 1 || rdi.hid.usUsage != 5) // Gamepad
|
||||
if (rdi.hid.usUsagePage != 1 || (rdi.hid.usUsage != 4/*Joystick*/ && rdi.hid.usUsage != 5/*Gamepad*/))
|
||||
continue;
|
||||
|
||||
WCHAR devName[MAX_PATH] = L"";
|
||||
|
||||
Reference in New Issue
Block a user