Status of HID in Wine

Aric Stewart aric at codeweavers.com
Thu Nov 3 10:15:02 CDT 2016


Hello everyone,

So with this the last few commits I can officially say that WINE now has a fully functioning HID stack for Linux hidraw devices. Thanks to Sebastian Lackner and Alexandre for all the help, reviews and attention paid. It is working and in the state it is now because of their assistance. 

This means that applications that use hid.dll or direct device access to HID devices will start seeing and being able to interact with devices. This is very exciting but is just the very first step. Of course any application trying to do HID directly would be a wonderful test case, I am sure there are many many things that will need to be refined and added before a real application starts being happy.

I do have a very rough, quick, poorly coded test case for HID controllers available to the curious.

https://www.codeweavers.com/xfer/aric/HID/hid.exe

There are still manual steps required before things will start working. 

1) By default no hidraw devices on Linux are given any access to users. So you will need to had rw permission to the /dev/hidraw<X> device  that you want to have accessible in Wine.  Or if you want to be wild and crazy you can add a new udev rule to add permission to all the devices as they are added.
2) The winebus service is not started by default yet. so you will need to start winebus.  (wine net start winebus) This makes things a little complicated. I would recommend testing with a process like this:
	wine cmd
	net start winebus
	<test application>
  Or you an change the service start for winebus in the registry [System\\CurrentControlSet\\Services\\WineBus] "Start"=dword:00000002

I would love comment, reports, anything as people test various devices and programs.

As for more platforms, patches for OS/X have just been submitted so that IOHID devices will work on Mac. Then I have a set of patches adding linux event devices as well.

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)

So tell me how things work!
thanks,
-aric



More information about the wine-devel mailing list