Status of HID in Wine

Aric Stewart aric at codeweavers.com
Mon Nov 14 08:01:35 CST 2016


Hi Juan!

Great to hear from you! 

On 11/10/16 3:20 PM, Juan Jose Gonzalez wrote:
> Hi,
> 
> On 11/03/2016 04:15 PM, Aric Stewart wrote:
>> Looking forward, the hope is that then we will be able to build RawInput support on top of HID, and also dinput and xinput support as well. As a fun challenge I have been working to get native dinput from DirectX 9 to work on Wine on top of HID and it is moving forward much better than I expect, with a lot of hacks at present. (native Dinput sees the gamepads and even start trying to read them, but current is not getting reports properly)
> I'm glad to see so much progress on the HID functionality. As for Dinput
> and Xinput, last time I was active in the mailing list there was a
> discussion about how to correctly identify Xinput devices in programs
> that can enumerate both Xinput and Dinput controllers.
> 
> Have you thought about how to allow software to differentiate between
> Dinput-only and Xinput+Dinput devices? Roderick Colenbrander wrote that
> many old games that support Xinput+Dinput use WMI to identify Xinput
> devices. Apparently it's what the article on MSDN I found last time
> proposes too, I just didn't see the bit about it being WMI before:
> https://msdn.microsoft.com/en-us/library/windows/desktop/ee417014(v=vs.85).aspx
> 

So the key thing is if the device has an IG_ string in the device Identifier. I intend to investigate more closely where that is done. I feel like it is likely on the bus level there is some logic that determines if the device is and XInput device and if so uses IG_<#> to list the device, Normal devices use IM_<#> in that place in the identity.

Right now, with my HID stuff, all gamepads/joysticks are identified with IG_ I know that is wrong long term but can be corrected as we need to properly identify XInput compatible devices.

> I feel like there needs to be a layer between HID and Dinput/Xinput that
> checks whether a certain HID device is an XInput controller and fills in
> the correct info before passing it to DInput and XInput. Since we're
> just mapping HID devices, that "check" must know all possible mappings
> for XInput devices, so basically it must contain most of the
> functionality that several of us have implemented directly in xinput.dll
> in one way or another.
> 

I don't know if that needs to be between HID and XInput. I think it can be part of the device bus logic. I am going to investigate with this Logitech F310 gamepad that identifies as an XInput device when the little switch is switched over. That will give me an idea of where and at what level the IG_ identifier is added.

-aric

>>
>> So tell me how things work!
>> thanks,
>> -aric
>>
>>
> 
> Best regards,
> Juan
> 



More information about the wine-devel mailing list