[PATCH 1/3] RawInput: Uppercase the device names up to the GUID.

Rémi Bernon rbernon at codeweavers.com
Wed Feb 24 02:29:15 CST 2021


On 2/24/21 9:25 AM, Arkadiusz Hiler wrote:
> On Mon, Feb 22, 2021 at 01:50:36PM +0200, Arkadiusz Hiler wrote:
>> This is a preparation for a patch that changes setupapi to return lowercased
>> device paths, which is the source of RawInput device names. On Windows
>> RawInput returns mostly uppercase names (except the GUID part) and we want to
>> keep Wine's old behavior in this regards as SDL 2.0.14+ looks for uppercase IG_
>> to match xinput devices to their RawInput counterparts.
>>
>> Signed-off-by: Arkadiusz Hiler <ahiler at codeweavers.com>
>> ---
>>   dlls/user32/rawinput.c | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
>> index ba11a121bc5..13aac0278d5 100644
>> --- a/dlls/user32/rawinput.c
>> +++ b/dlls/user32/rawinput.c
>> @@ -94,7 +94,7 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
>>       SP_DEVICE_INTERFACE_DETAIL_DATA_W *detail;
>>       struct device *device;
>>       HANDLE file;
>> -    WCHAR *path;
>> +    WCHAR *path, *pos;
>>       DWORD size;
>>   
>>       SetupDiGetDeviceInterfaceDetailW(set, iface, NULL, 0, &size, NULL);
>> @@ -121,6 +121,9 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
>>       }
>>       heap_free(detail);
>>   
>> +    /* upper case everything but the GUID */
>> +    for (pos = path; *pos && *pos != '{'; pos++) *pos = towupper(*pos);
>> +
> 
> I assume that this patch is the reason why this series is still pending.
> I wonder if using instance id to overwrite part of the path would make
> the change more acceptable.
> 
> Oh, and all the failures look like false positives. I haven't seen any
> difference in the results when running the tests locally.
> 

Yes, user32 tests results are not very stable.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list