[PATCH 7/8] winexinput.sys: Return native product strings on some devices.
Rémi Bernon
rbernon at codeweavers.com
Mon Sep 6 13:34:41 CDT 2021
On 9/6/21 7:06 PM, Zebediah Figura wrote:
> On 9/6/21 1:40 AM, Rémi Bernon wrote:
>> + case IOCTL_HID_GET_STRING:
>> + switch
>> ((ULONG_PTR)stack->Parameters.DeviceIoControl.Type3InputBuffer)
>> + {
>> + case HID_STRING_ID_IPRODUCT:
>> + match_id = wcsrchr(impl->device_id, '\\') + 1;
>> + for (i = 0; i < ARRAY_SIZE(device_strings); ++i)
>> + if (!wcsicmp(device_strings[i].id, match_id))
>> + break;
>> + if (i < ARRAY_SIZE(device_strings)) str =
>> device_strings[i].product;
>> + break;
>
> Just a suggestion, really, but this might be cleaner as a helper function?
>
Well, I don't plan on adding anything more there, so maybe it could be
split later if we need to.
Also AFAICS Windows gets the device product string from the driver inf
file, and never calls IOCTL_HID_GET_STRING, so this could just go away
when we have a similar implementation.
--
Rémi Bernon <rbernon at codeweavers.com>
More information about the wine-devel
mailing list