## Context
This is a problem discovered when running "Max: The Curse of Brotherhood" under proton. This game writes 4MB a piece into `wg_transform`, which contains about 4 seconds of compressed video. `wg_transform` calls `gst_pad_push` in `transform_ProcessOutput`, which takes \~300ms (i.e. 20 frames @ 60fps) to decode this buffer of video. So the end result is the game hitches every 4 seconds while playing cut scene videos.
Proton currently has a special case for this particular game, for which it breaks up the buffer into small chunks to avoid long blocks. This MR adopts that and applies it generally.
One concern raised by @redmcg is:
> The only issue I can think of is if there are any decoders which don't have a parser; then they might not know how to deal with an arbitrary 4096 byte buffer (the parser is generally responsible for taking arbitrary buffers and producing something the decoder can work with, for example: a full frame).
So this MR only enables this strategy when there is a parser element.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7288
I can see that you quoted MSDN page in the other MR, but it's not clear to me if it's relevant. It mentions some IIS APIs, not how HTTP headers look like. I guess adding a test to `test_http_connection()` that would send "-1" "Expires" header and querying `INTERNET_OPTION_CACHE_TIMESTAMPS` on the result would tell us how it works.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7323#note_95883
Allows running more tests with nulldrv, including some D3D tests with vulkan renderer.
--
v2: win32u: Use VK_EXT_headless_surface for nulldrv surface.
winevulkan: Enable VK_EXT_headless_surface extension.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7412
It's not clear to me what we should do in case of "-1". My understanding of HTTP spec is that it's invalid, which would suggest that failing to parse is the right thing to do. Does it break some application? If it does, maybe it expects ETag to be used and "Expires" header to be ignored?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7323#note_95881
I'm trying to change the static arrays of axis usages in `hid_device_add_physical()` into a `for` loop + a new function based on the current `hid_report_descriptor_append_usage()` but had some issues. I'll update the MR when I get it to work.
Seems like a better idea if the `PID_AXIS_MAX` was ever to change.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7422#note_95872
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.
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`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7422