Adding RID_TYPEHID RawInput support to user32

Nathan Schulte nmschulte at gmail.com
Fri Jul 3 13:41:07 CDT 2015


I'm working to extend Wine's RawInput implementation to support 
gamepads/controllers (and possibly joysticks, or any non-keyboard/mouse 
HID device).

I found this on the wine-patches list:

Vincas Miliūnas wrote:
 > A comment about going beyond mouse/keyboard for raw input:> Other 
devices then mouse&keyboard produce undocumented blobs of bytes;> to 
interpret them, functions from the hid.dll are used. Currently they> are 
unimplemented stubs in WINE as well as not the problem I am solving.> 
There is a recent article about this subject - Using the Raw Input API> 
to Process Joystick Input -> 
http://www.codeproject.com/KB/game/RawInputJoystick.aspx

Does this imply then, that if one was to add support for "raw" rawinput
(RIM_TYPEHID device type) it could be used in conjunction with a native
hid.dll and software that required RIM_TYPEHID input (for e.g. game
controllers in games) would start working?

Also, could one create an adaptation from some joystick input libraries
(evdev/x11) and make it conform to the API in the CodeProject example,
making modifications similar to Henri Verbeet's and have built-in
support for this?

(Henri Verbeet's rawinput contributions:
http://source.winehq.org/git/wine.git/?a=search&st=commit&s=rawinput)

I see that Wine already has support for joysticks in some other fashion 
(the gamepad I'm working with shows up in the `wine control` Game 
Controller testing interface), and I bet it's a good idea to leverage 
that adaptation (those adaptations...) than to start adding my own.

Any direction here would be appreciated.  I think I understand the 
separation between the wineserver (mainly server/queue.c) and the dlls 
(dlls/user32/*), but I see that there are other "dlls" that don't use 
(or don't appear to use, given my probably incorrect understanding) 
wineserver for their adaptation, and instead talk directly with the 
Linux libs to do their work (I'm assuming).

Any help is welcome, as it means my patches are more likely to make it 
upstream and benefit others.  I'm wondering if there's an architecture 
diagram/doc somewhere to help me understand how the system works.

Thanks,

--
Nate



More information about the wine-devel mailing list