This fixes a real problem and improves behavior at the same time.
- ~~Fixes: hanging when trying to run Wine built with epoll_pwait2 headers available but epoll_pwait2 is missing in the run-time kernel (i.e. build 5.11->run 5.10)~~ (already fixed.)
- Improvement: bring the improved timeout resolution to Wine builds
which didn't have epoll_pwait2 at compile time, if the run-time kernel supports it
(i.e. build 5.10->run 6.14)
This last point is especially important in my opinion, as it applies to official Proton builds.
Proton is (currently) built in Debian 11 with kernel 5.10, but SteamOS is a moving target with
a much newer kernel version being used to run these Wine builds.
These builds use the lower resolution timeouts if epoll_pwait2 is only checked for at compile-time,
when it can cheaply and easily be done at run-time instead.
~~Fixes: 87ca5db40e2c1b37423bdc25101a5c5e39e67e6f~~
~~An alternative to !7640 that kills two birds with one stone.~~
--
v6: server: Use dlsym() to check for epoll_pwait2 at run-time.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7642
This fixes failure to play the prologue video in Planet of the Apes: Last Frontier, which unpauses by calling Start() with a location. The exact state leading to this issue does not occur in the Start() tests, and it's not clear how to reproduce it reliably.
--
v5: mf: Reset transform nodes when seeking.
mf: Initialise the grabber sample count when setting state after a seek.
mf: Reset transform node outputs when seeking.
mf: Flush nodes before restarting a paused source at a specific position.
mf: Drop transform node input events when unpausing at a specific position.
mf: Reset transforms before restarting a paused source instead of after.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7466
WMSyncReader starts a background read thread that reads from the IStream
passed to IWMSyncReader::OpenStream. This means it could use the IStream in the
background even when no IWMSyncReader methods are being called.
For well-behaved applications, this is probably OK. However, AQUARIUM
(Steam 2515070) frees the IStream it passes to WMSyncReader _before_
it calls IWMSyncReader::Close, which stops the read thread. This causes
the read thread to access freed memory. This is improper, but not
unreasonable, as IWMSyncReader is supposed to be a synchronous
interface, so one might assume when they weren't calling into
IWMSyncReader methods, the IStream won't be used.
This commit adds a `wg_parser_dont_read` function, which can be used to
stop wg_parser from issuing read requests. This is used by IWMSyncReader
to make sure read requests are only issued when IWMSyncReader methods
are being called.
--
v2: winegstreamer: Make sure WMSyncReader never reads in the background.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7676
Calling MFScheduleWorkItemEx() schedules the operation in the timer
queue, but unless GetParameters() returns the timer queue, callback
invocation will occur in the standard queue.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7696
XIM events are handled by Xlib internally and need to go through XFilterEvent to be processed.
This allows for keyboard input to be processed while connected to an input method daemon when an application only polls for keyboard input.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7509