--
v2: dmloader: Don't use ReleaseObject() in loader_ClearCache().
dmloader: Mark cached objects as loaded.
dmloader: Don't remove the default collection from the cache.
dmloader: Free the cache entries manually in loader_Release().
dmloader/tests: Add some ClearCache() tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9408
Previously the Flush method was a no-op that always returned S_OK
Now it properly calls FlushFileBuffers on the underlying file handle
This ensures that all buffered data is written to disk
Added error handling to return STG_E_WRITEFAULT on flush failures
This fixes potential data loss issues when using file-based lock bytes
Log: Fixed file flushing to prevent data loss in file operations
Signed-off-by: Jiajin Cui <cuijiajin(a)uniontech.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9431
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58846
Wine D3D resets the window pixel format to its original value when an internal pixel format was requested and the context done being used, and requests the internal pixel format again before it is used again. When internal pixel format and window pixel format don't match this causes any previously created OpenGL surface with a different format to be released (and destroyed as no context is current with it), creating a new one with the new format, back and forth.
What we actually need here, is to keep the wined3d OpenGL client surface, with the internal pixel format, alive as long as it is being referenced by wined3d, as well as any OpenGL client surface that may have been created, with the window pixel format, by the application itself.
It's not possible to rely on DCs for application-created OpenGL surfaces, as the application is free to release its DC and retrieve another one later on for the same window while still expecting it to use the same OpenGL surface. However with wined3d, we know that the DCs are being kept referenced until the context is being destroyed so we can safely use them to store the wined3d OpenGL surface.
--
v4: wined3d: Remove now unnecessary pixel format restoration.
win32u: Get rid of window internal pixel format.
win32u: Keep D3D internal OpenGL surfaces on the DCs.
wined3d: Call wglSetPixelFormatWINE before releasing context DC.
win32u: Set the DC pixel format too in wglSetPixelFormatWINE.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9382
Follow-up to !8184.
This also adds a bunch of helpers for writing media source tests (without involving the mf session) in mfsrcsnk, these could be helpful for more tests of this kind in the future. I'm somewhat unsure as to why we haven't done tests for source behavior so far: while those are plugins, applications rely on a bunch of things in the builtin sources that microsoft provides.
Since this affects both mfsrcsnk and winegstreamer sources, tests should be run both with `HKCU\\Software\\Wine\\MediaFoundation\\DisableGstByteStreamHandler` enabled and disabled. Due to this I figured it'd make sense to implement everything first and then remove the test todo_wine's and the statements rejecting the thin parameter in a single commit ("Allow thinning"). Perhaps this could be solved more nicely by setting the registry key in the tests themselves? I'm unsure if that is something we do in tests, generally.
`MEStreamThinMode` events need to be emitted between the last sample using the outdated thinning parameter and the first sample using the updated thinning parameter. The winegstreamer implementation for this turned out a bit complex, if there is a simpler way to do this please let me know.
Regarding winegstreamer, note that buffers need to be intercepted before the decoder because decoders often discard `GST_BUFFER_FLAG_DELTA_UNIT` flags (which is already annoying in itself - it causes all samples to be marked as `MFSampleExtension_CleanPoint`, this should potentially be worked around in the future). But even besides that, intercepting before the decoder is the "proper" implementation, since the point of thinning is increasing decoding speed by skipping delta frames, tho there are some games that rely on the semantics as well.
--
v4: mfsrcsnk: Emit MEStreamThinMode event.
mfsrcsnk: Move media_source_send_sample.
mfsrcsnk: Implement thinning.
winedmo: Generate missing timestamps.
mfsrcsnk/tests: Add tests for thinning.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8505
On Windows playing back a metafile with Arabic text does not use provided
positions for individual glyphs, but instead shapes it properly.
This change should not affect anything that does not require complex processing.
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9379