Determine device type from LampArray kind

This commit is contained in:
Adam Honse
2026-01-31 20:41:19 -06:00
parent 76237c0a35
commit 9ea62f4333
3 changed files with 39 additions and 1 deletions

View File

@@ -26,11 +26,43 @@ RGBController_HIDLampArray::RGBController_HIDLampArray(HIDLampArrayController* c
name = controller->GetDeviceName();
vendor = "Generic";
type = DEVICE_TYPE_MOUSEMAT;
description = "HID LampArray Device";
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
/*-----------------------------------------------------*\
| Determine device type from LampArray kind |
\*-----------------------------------------------------*/
switch(controller->GetLampArrayKind())
{
case HID_LAMPARRAY_KIND_UNDEFINED:
default:
type = DEVICE_TYPE_UNKNOWN;
break;
case HID_LAMPARRAY_KIND_KEYBOARD:
type = DEVICE_TYPE_KEYBOARD;
break;
case HID_LAMPARRAY_KIND_MOUSE:
type = DEVICE_TYPE_MOUSE;
break;
case HID_LAMPARRAY_KIND_GAME_CONTROLLER:
type = DEVICE_TYPE_GAMEPAD;
break;
case HID_LAMPARRAY_KIND_PERIPHERAL:
case HID_LAMPARRAY_KIND_SCENE:
case HID_LAMPARRAY_KIND_NOTIFICATION:
case HID_LAMPARRAY_KIND_CHASSIS:
case HID_LAMPARRAY_KIND_WEARABLE:
case HID_LAMPARRAY_KIND_FURNITURE:
case HID_LAMPARRAY_KIND_ART:
type = DEVICE_TYPE_ACCESSORY;
break;
}
mode Direct;
Direct.name = "Direct";
Direct.value = 0;