--
v3: include: Fix wmemchr C++ warning.
include: Fix InlineIsEqualGUID C++ warning.
include: Add some _BitScanForward(64) declarations in intrin.h.
include: Add a __shiftright128 intrinsic definition.
include: Add a _umul128 intrinsic definition.
include: Move FILE_DISPOSITION_INFO after DeleteFile(A|W).
include: Add a MB_CUR_MAX definition in ctype.h.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6752
This is an adjustment of 7324.
d3d9:visual already has a test that's relatively close to what a simplified
version of the tests in 7324 looked like, so I made the few changes to expand
that test to match and then ported it to ddraw.
Implementation-wise, this removes the SD/HD difference (which only exists on
NVidia and is not necessary to improve the mentioned application).
It also removes the clamping of YUV values, which as the tests show is not
correct.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7416
This MR adds the ability to support float encoding (which will be used by the IMFTransform interface).
It also adds tests and addresses a number of small discrepancies discovered between the Wine and native implementation.
--
v3: mp3dmod: Ensure nChannels is greater than zero on input.
mp3dmod/tests: Add test for nChannels = 0 on input.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7432
These changes are enough to allow building the entirety of the native (ELF) side with `-flto`.
--
v3: loader: Mark thread_ldt, thread_data, wld_start "used".
ntdll: Mark call_init_thunk and abort_thread "used".
https://gitlab.winehq.org/wine/wine/-/merge_requests/7119
This patch series reworks `D3DXSaveSurfaceToFileInMemory()` to use the new `d3dx_save_pixels_to_memory()` function.
It also adds support for selecting a replacement pixel format when the image file format being saved to doesn't have direct support for the pixel format being saved. The code for calculating the best replacement format was inspired by the code in `check_texture_requirements()` in `d3dx9_36/texture.c`. This should fix WineHQ bug 51584, but I haven't tested that.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7436
Related Wine issue: https://bugs.winehq.org/show_bug.cgi?id=52714
I'm starting work on updating/extending Linux force feedback API and one of my goals is to expose the number and an array that contains the device's ffb-enabled axes. As I'm mainly working with USB PID driver, I already have a POC of obtaining this data.
What prompted this is that currently Wine always creates virtual joysticks with two PID ffb axes. This causes issues with [Richard Burns Rally](https://github.com/ValveSoftware/Proton/issues/6702#issuecomment-267…, as this game incorrectly initializes a `CONSTANT_FORCE` effect with all the FFB axes that contain `DIDOI_FFACTUATOR` flag and then trying to update `cAxes` and `rgdwAxes` values which leads to `DIERR_INVALIDPARAM`.
Now, this flag is set by wine while enumerating virtual device's axes and while `(axis index < FFB axes)`, flag is applied. This means, that every device which has FFB functionality and at least two axes, will report FFB on `X`, `Y`.
While updated API would mean a lot of steering wheels would correctly report only 1 axis, a lot of USB PID wheels still include `X` and `Y` in their `AXES_ENABLE` and `DIRECTION` usages. This, again, would lead to broken FFB (in affected games).
On Windows, there's a possibility of overwriting some joystick capabilities with registry entries, which ends up removing `DIDOI_FFACTUATOR` flag from a selected axis. This doesn't work in Wine.
This MR allows Wine to add an arbitrary number (up to `PID_AXES_MAX`) of axes to the PID descriptor, based on the value of Haptic Axes from SDL or from Linux FF api in the future (I'm working on it). Additionally, to work around RBR and other games with similar, wrong FFB handling, I introduced a [hint](https://github.com/libsdl-org/SDL/issues/12341) to SDL that allows a dynamic overwrite of the number of haptic axes. For the Linux API, I'll figure out a nice way to override when the number of axes will be exposed.
With these changes, I was able to successfully get force feedback on my Moza Racing R9 with all axes usable. With additional traces in the dinput code, I confirmed that with one axis defined in the PID descriptor, the game created a constant force effect with just one axis and `cAxes = 1`.
--
v6:
https://gitlab.winehq.org/wine/wine/-/merge_requests/7422
Supersedes !741.
On macOS 10.14+ `thread_get_register_pointer_values` is called on every thread of the process.
On Linux 4.14+ `membarrier(MEMBARRIER_CMD_PRIVATE_EXPEDITED, ...)` is used.
On x86 Linux <= 4.13 and on other platforms it falls back to calling `NtGetContextThread()` on each thread.
The fast path patches from @tmatthies are slightly modified in the following ways:
1. On unsupported platforms, the `try_*()` functions return `FALSE` instead of `0`.
2. `try_exp_membarrier()` is called first, then `try_mach_tgrpvs()`.
---
Known applications fixed by this MR:
- osu! (rhythm game) song selection menu stuttering
- .NET CoreCLR GC
- HotSpot JVM (-XX:+UseSystemMemoryBarrier) safepoints
--
v4: kernel32/tests: Add a store buffering litmus test involving FlushProcessWriteBuffers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7250