Affected games: Phasmophobia, Lethal Company.
The games do not use joystick input but Unity Input subsystem is initialized and that's enough to cause stack overflow when it tries to parse 8 bit hat switches. Most joysticks and some mice have hats.
I own 2 Thrustmaster devices and this fixes the problem with them plugged in. I've also seen [report descriptors shared by Proton users](https://github.com/ValveSoftware/Proton/issues/7284) that reported the crash. The real devices always use 4 bits only.
This MR was tested using a few dinput test programs (upstream Wine) and Elite Dangerous (change was applied on top of the Proton tree). Singular hat works. I don't have anything with more than that though.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4964
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56259
Note: the stub now returns for the last two parameters the values
that the testbots gave me (DEVICEFAMILYINFOENUM_DESKTOP and
DEVICEFAMILYDEVICEFORM_UNKNOWN). The first parameter returned some value
that I don't get (like 0xa00004a63066d), for now i set it to 0, as the
Webview installer didn't use this anyway (null pointer).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4973
Huw Davies (@huw) commented about include/netioapi.h:
> LARGE_INTEGER CreationTimeStamp;
> } MIB_UNICASTIPADDRESS_ROW, *PMIB_UNICASTIPADDRESS_ROW;
>
> +typedef struct _MIB_ANYCASTIPADDRESS_ROW {
Please move the opening brace to the next line.
Additionally, let's move this below the unicast table definition below.
Further, please add the function prototype (with the others, near the end).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4940#note_59470
Huw Davies (@huw) commented about dlls/iphlpapi/iphlpapi_main.c:
> row->CreationTimeStamp.QuadPart = stat->creation_time;
> }
>
> +DWORD WINAPI GetAnycastIpAddressTable(ADDRESS_FAMILY family, MIB_ANYCASTIPADDRESS_TABLE **table)
Could you move this so that it doesn't split the Unicast implementation, perhaps below `GetUnicastIpAddressTable()`?
Also, please capitalize the first leteter of 'add' in the commit message.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4940#note_59469