When cross-compiling on macOS, like building on ARM64 to target x86_64 [1], `make install` would fail with `winebuild: cannot find the 'ar' tool`. `winebuild` was looking for `x86_64-apple-darwin-ar`, but macOS does not install prefixed tools. As a last step before failing in `find_tool()`, search for the un-prefixed tool name.
[1]: with a `configure` invocation like: `../configure --enable-archs=i386,x86_64 --host=x86_64-apple-darwin CC="clang -arch x86_64"`
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4966
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.
--
v3: winebus.sys: Use 4 bits for hat switches.
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).
--
v4: ntdll: Add stub for RtlGetDeviceFamilyInfoEnum.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4973
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).
--
v3: ntdll: Add stub for RtlGetDeviceFamilyInfoEnum.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4973
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).
--
v2: ntdll: Add stub for RtlGetDeviceFamilyInfoEnum.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4973