Support for raw HID interaction in Wine?

Questions about Wine on Linux
Locked
mikew
Newbie
Newbie
Posts: 2
Joined: Sat Nov 04, 2017 5:49 am

Support for raw HID interaction in Wine?

Post by mikew »

Hi! After trawling through the wiki/FAQ etc, curiosity makes me sign up and ask this question...

I am running a program called TFXplorer in Wine (2.18 staging) on 64 bit Fedora 26 (Xfce spin).
This program works fine on Windows and is remarkable in that it only uses the Windows API (ie without any 3rd party libraries) and that it uses hid.dll to handle mouse, keyboard and joystick...which may be of interest from a Wine development point of view.
TFXplorer uses DX3D 9.0c for graphics and rendering is simply wonderful, so I have to applaud the Wine developers for that.

One problem I'm having is that my joystick is not being detected. It works fine in native Linux, and is detected OK when I run 'wine control'.
In order to detect what HID devices are present, TFXplorer calls the user32 function 'GetRawInputDeviceList' which only returns descriptors for two items: "\\?\WINE_MOUSE" and "\\?\WINE_KEYBOARD" so it is assumed the joystick is not present.

So, I suppose the question is what level of support can I expect in Wine for raw HID interaction?
All the functions in user32.dll and hid.dll that TFXplorer uses are marked 'not documented' in the WineAPI, so it's difficult to work it out and I don't have the programming knowledge to inspect the code base.

If anybody would be kind enough to investigate, the x86 version of TFXplorer can be downloaded from the first link in the following forum post which also explains a bit about what the program does.
Unless you happen to have the data file 'did.dat' from the games EF2000, F-22 ADF or 'F-22 Total Air War', the program can't be seen in all its glory, but will run the HID detection routine without it.
http://community.combatsim.com/topic/31 ... nt=5190647

Please let me know if there's any further information I can supply....and thanks for reading if you've got this far. :)
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Support for raw HID interaction in Wine?

Post by Bob Wya »

@mikew,

I presume you've looked at: WineHQ: Hid ??

I'd file a bug on the WineHQ Bugzilla ...
Maybe also hit up Aric Stewart (HID Subsystem maintainer) on the [email protected] mailing list.
Cross-link to your bug report. I'm sure he'd appreciate some more folks banging on the API - with some different devices! 8)

Bob
mikew
Newbie
Newbie
Posts: 2
Joined: Sat Nov 04, 2017 5:49 am

Re: Support for raw HID interaction in Wine?

Post by mikew »

Bob, many thanks for your answer!
Bob Wya wrote: I presume you've looked at: WineHQ: Hid ??
"looked at": Yes! "read and understood": seemingly not :(

Maybe some clues from the "Steps to do HID Testing" instructions where, after changing the 'dev/hidrawX' permissions, I get:

Code: Select all

[mike@localhost tfxtest]$ wine cmd
fixme:winediag:start_process Wine Staging 2.18 is a testing version containing experimental patches.
fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
Microsoft Windows 6.1.7601 (2.18)

Z:\home\mike\tfxtest>net start winebus
The Platform Bus Kernel service is starting.
Service already running.

Z:\home\mike\tfxtest>err:hid_report:process_hid_report Device reports coming in too fast, last report not read yet!
err:hid_report:process_hid_report Device reports coming in too fast, last report not read yet!
err:hid_report:process_hid_report Device reports coming in too fast, last report not read yet!
..although trying to to add the WINEDEBUG line didn't result in any extra information:

Code: Select all

[mike@localhost tfxtest]$ WINEDEBUG=+hid_report, wine "TFXplorer x86.exe"
fixme:d3d:wined3d_dxtn_init Wine cannot find the txc_dxtn library, DXTn software support unavailable. 
I don't think I have enough information to raise a bug report yet, but your advice has helped a lot. :)
Locked