## 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.
--
v5: winegstreamer: Avoid large buffer pushes in wg_transform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7288
This patch series adds quite a few new tests for saving to image file formats that aren't DDS, and adds partial support for saving surfaces to targa files.
--
v2: d3dx9: Add basic support for saving surfaces to targa files.
d3dx9: Add TGA prefix to targa specific defines.
d3dx9/tests: Add tests for saving surfaces to non-DDS files.
d3dx9/tests: Add a test for saving a surface as D3DXIFF_DIB.
d3dx9/tests: Add some more tests for saving surfaces as targa files.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7386
There is no ([not yet?](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requ…) dedicated protocol for requesting pointer warps, but it's possible to request one with `zwp_locked_pointer_v1.set_cursor_position_hint` which may be performed when the pointer is unlocked. The idea is to quickly lock/set position/unlock. This is used by SDL (in some cases: [SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE](https://wiki.libsdl.org/SDL3/SDL_HINT…) and Xwayland. The limitation is/will be that the compositor will ignore requests to warp the pointer outside of surface bounds.
What I'd like to have working is the auto cursor placement feature of some applications, where they just want to call SetCursorPos towards specific UI elements inside their single window, and usually they'll be unclipped and have a visible cursor while doing this.
This patch also happens to allow mouselook to work in applications which use SetCursorPos for mouselook and aren't getting covered by the heuristics that turn on Wayland relative motion (for some reason the driver thinks the cursor is visible). Seems to affect Half-Life (GoldSrc) on my system. Though force enabling relative motion with an environment variable in a custom build or somehow improving the heuristics will also fix that.
A suface/pointer can only have one lock or confinement, and this implementation depends on the pointer lock. So if needed, I temporarily unlock/unconfine in order to do the warp then relock/reconfine. I modified `wayland_pointer_update_constraint` so I don't have to temporarily disable relative motion during this in case it's enabled. I think it's safe/a no-op to attempt pointer warps while using relative motion, as according to the protocol the warp will not generate a relative motion event, and while there will be a wl_pointer motion event, they're ignored while relative motion is being used.
--
v4: winewayland: Implement SetCursorPos via pointer lock.
winewayland: Update locked pointer position hint.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7353
On Wed Feb 26 12:04:41 2025 +0000, Yongjie Yao wrote:
> In fact, some HTTP server will send "Expires: -1" in HTTP response header.
> You are right, HTTP spec is that invalid value, include "0".
> I add a test to test_http_connection() that would send "Expires: -1" in
> response header, I get the error log:
> ```
> 0024:err:wininet:HTTP_ParseDateAsAsctime unexpected weekday L"-1"
> 0024:err:wininet:HTTP_ParseDate unexpected date format L"-1"
> ```
> Maybe we should just treat "Expires: -1" as an invalid date format and
> ignore it.
I mean you should test it on actual Windows
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7323#note_95992
In fact, some HTTP server will send "Expires: -1" in HTTP response header.
You are right, HTTP spec is that invalid value, include "0".
I add a test to test_http_connection() that would send "Expires: -1" in response header, I get the error log:
```
0024:err:wininet:HTTP_ParseDateAsAsctime unexpected weekday L"-1"
0024:err:wininet:HTTP_ParseDate unexpected date format L"-1"
```
Maybe we should just treat "Expires: -1" as an invalid date format and ignore it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7323#note_95990
Needed for Indiana Jones and the Great Circle.
---
The naming of the shellfolders one is not a mistake; they seemed to have named it differently than all the other shell API sets.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6977
Instead of checking for monitor rect.
Similar purpose as https://gitlab.winehq.org/wine/wine/-/merge_requests/7362
--
v5: winewayland: Pass fullscreen flag to is_window_managed.
winex11: Pass fullscreen flag to is_window_managed.
winex11: Check managed window changes in WindowPosChanged.
winex11: Request managed/embedded in a new window_set_managed helper.
winex11: Initialize window managed flag in create_whole_window.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7370
This MR:
- adds tests for when MF_MT_AM_FORMAT_TYPE is missing or set to GUID_NULL; and
- modifies MFCreateWaveFormatExFromMFMediaType to pass these tests
--
v2: mfplat: Allow MF_MT_AM_FORMAT_TYPE to be missing or set to GUID_NULL.
mfplat/tests: Add additional MFCreateWaveFormatExFromMFMediaType tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7417
If a surface is being clipped and hides the cursor, drawing its own one,
winewayland constrains using a pointer lock and enables Wayland relative
motion. If the application decides to stop drawing its own cursor and
make the cursor visible, winewayland will disable relative motion and
pointer lock, and enable pointer confinement. The user will perceive a
pointer jump from the win32/application drawn cursor to where the
Wayland pointer is after being unlocked and an absolute motion event is
received, because they were desynchronized due to the Wayland one being
locked in place.
The pointer constraints protocol says this:
> If the client is drawing its own cursor, it should update the position
> hint to the position of its own cursor. A compositor may use this
> information to warp the pointer upon unlock in order to avoid pointer
> jumps.
So, right before unlocking, make a request for the compositor to warp
the pointer to the win32 position on pointer unlock.
--
v4: winewayland: Update locked pointer position hint.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7352