[PATCH 1/4] user32: Uppercase the RawInput device names sans the GUID.

Rémi Bernon rbernon at codeweavers.com
Thu Dec 23 08:38:12 CST 2021


On 12/23/21 15:33, Rémi Bernon wrote:
> From: Arkadiusz Hiler <ahiler at codeweavers.com>
> 
> This is a preparation for a patch that changes setupapi to return lowercased
> device paths, which is the source of RawInput device name here. On Windows
> RawInput returns mostly uppercase names (except the GUID) and we want to keep
> that behavior.
> 
> Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
> ---
> 
> First two patches have been in Proton for a long while.
> 
> They aren't directly related to the SDL issue described in PATCH 3, and
> as we're already using upper case device paths it's possible to skip
> them.
> 
> However they fix some other kind of hotplug problem, and so I think they
> are related and worth having. Then, because SDL checks for uppercase
> "IG_", we need PATCH 1 before PATCH 2.
> 
> I'm a bit unsure about PATCH 4, as creating a (msg) window in DllMain is
> probably not great, but I don't really how else we can make sure XInput
> gets notified first. It would be better to avoid refreshing the device
> list on every call.
> 

I really don't know how bad it is to do that in DllMain.

As a possible (ugly?) workaround, after PATCH 3 which should keep it up 
to date, it may be possible to use user32 rawinput device list to tell 
whenever new devices have appeared instead. We'll still have to call it 
on every XInput call though, which is less ideal than handling the 
notifications.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list