One of them found by @zfigura, the rest found by `grep -rI '\->lpVtbl->' | grep -P '#\s*define\s+I\w*_(\w+)\s*\(.*->lpVtbl->' | grep -vP '#\s*define\s+I\w*_(\w+)\s*\(.*->lpVtbl->(?:\w+_)?\1'`
[02:21:31] \<zf> #define IXACT3Cue_Play(p) (p)->lpVtbl->Destroy(p)
[02:21:44] \<zf> this kind of nonsense is why I want to compile everything with widl
[02:21:56] \<zf> this took me hours to find
--
v3: include/xact3.h: Fix some typoed vtable call macros.
include/xact.h: Fix some typoed vtable call macros.
include/objbase.h: Fix some typoed comments.
include/mapidefs.h: Fix some typoed vtable call macros.
include/dpnathlp.h: Fix a typoed vtable call macro.
include/d3dx9shader.h: Fix a typoed vtable call macro.
include/d3drmobj.h: Fix some typoed vtable call macros.
include/d3d8.h: Fix a typoed vtable call macro.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7989
One of them found by @zfigura, the rest found by `grep -rI '\->lpVtbl->' | grep -P '#\s*define\s+I\w*_(\w+)\s*\(.*->lpVtbl->' | grep -vP '#\s*define\s+I\w*_(\w+)\s*\(.*->lpVtbl->(?:\w+_)?\1'`
[02:21:31] \<zf> #define IXACT3Cue_Play(p) (p)->lpVtbl->Destroy(p)
[02:21:44] \<zf> this kind of nonsense is why I want to compile everything with widl
[02:21:56] \<zf> this took me hours to find
--
v2: include/xact3.h: Fix some typoed vtable call macros.
include/xact.h: Fix some typoed vtable call macros.
include/objbase.h: Fix some typoed comments.
include/mapidefs.h: Fix some typoed vtable call macros.
include/dpnathlp.h: Fix a typoed vtable call macro.
include/d3drmobj.h: Fix some typoed vtable call macros.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7989
One of them found by @zfigura, the rest found by `grep -rI '\->lpVtbl->' | grep -P '#\s*define\s+I\w*_(\w+)\s*\(.*->lpVtbl->' | grep -vP '#\s*define\s+I\w*_(\w+)\s*\(.*->lpVtbl->(?:\w+_)?\1'`
[02:21:31] \<zf> #define IXACT3Cue_Play(p) (p)->lpVtbl->Destroy(p)
[02:21:44] \<zf> this kind of nonsense is why I want to compile everything with widl
[02:21:56] \<zf> this took me hours to find
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7989
Some of the hot-keys, such as “Edit→Cut” and “Edit→Time/Date” had
identical “T” hot-keys, as well as “Search→Search” and “Search→Search
Next” both being on “S”.
With this change, the menus are restructured to match the Windows XP
Notepad menus, in item names, capitalization, and hot-keys. Notably
the usability issue with conflicting hot-keys is eliminated. Users
familiar with the Microsoft Windows Notepad menus and their hot-keys
should be able to use Wine Notepad without changing any workflow.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7988
__STRINGTOLD_L expects a pointer to a `_LDOUBLE` as its first argument, which we internally declare
as `MSVCRT__LDOUBLE`. Problem is, `_LDOUBLE` is 10 bytes long, whereas `MSVCRT__LDOUBLE` is 12 bytes
long (ULONG * 3). Writing into the third ULONG is technically a buffer overflow.
Declare `MSVCRT__LDOUBLE` instead as 2 ULONGs plus a USHORT.
--
v2: msvcrt: Use _LDOUBLE type in exported functions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7961
This test failed on Linux 2 out of the last 67 times on test.winehq.org
because IMediaControl_GetState returned VFW_S_STATE_INTERMEDIATE,
evidently meaning that the command to pause had been received but not
yet carried out. Give it two seconds to complete instead of one to
ensure that it finishes.
--
v2: quartz/tests: Increase the timeout of a pause test in test_media_event.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7964
This ensures that the stride calculation performed by `gst_video_info_align`
matches the result in `wg_format_get_stride`. Otherwise, we can get a size
mismatch which will result in a `STATUS_BUFFER_TOO_SMALL` error.
This affected formats where not all planes had the same stride.
For example: I420, YV12, etc (where the 'U' and 'V' planes are
horizontally subsampled and stored in their own plane).
The error would occur if half the aligned primary plane stride was not also on
the desired alignment. For example: a width of 1828 would be padded to 1840
(aligned to the next multiple of 16), but half of this is 920 which is not
a multiple of 16. Hence `gst_video_info_align` was adding additional padding
to also align that, which is 928. The result would be a stride of 1856 for
the primary plane, whilst `wg_format_get_stride` would stay with the
original value of 1840.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7946
The practical issue I am trying to solve is the following scenario (encountered with a game using some Uplay plugin) which has regressed with apisets implementation in Wine. The game imports ucrtbase.dll. Then, a plugin calls GetModuleHandle("api-ms-win-crt-runtime-l1-1-0.dll") and expects GetProcAddress("\_crt_atexit") to succeed on the returned handle. The problem is that the game has ucrtbase.dll in its .exe directory. That one currently gets loaded. Then, find_dll_file() resolves api-ms-win-crt-runtime-l1-1-0.dll to the ucrtbase with a full path in system32 and tries to find that one (this part matches Windows behaviour as far as tests show). Since we have ucrtbase loaded with another path this results in NULL module handle.
Windows maintains the list of "Known DLLs" (probably aimed for speeding up processes startup by using pre-mapped dll images for commonly used system dlls). On Windows, known dlls have specifics in load path resolution when dll name doesn't contain path (relative or full):
- they are loaded from system directory even if there is another dll with the same name in priority search path;
- they are found even if library search paths do not contain system directory;
Those "Known DLLs" are basically listed in HKLM\\System\\CurrentControlSet\\Control\\Session Manager\KnownDLLs registry key. But the actual list of "known dlls" is bigger (probably includes all dependencies of those listed under registry key). The full actual list of "known dlls" is in '\\KnownDlls\' directory object which contains image sections under dll names. Most notably, ucrtbase.dll (which is of the concern in the regression) is not listed in registry but is present in \\KnownDlls. Technically nothing prevents us from implementing these mechanics and creating directory object with mapped load dlls, also resolving the explicitly listed dlls' dependencies. But it is not apparent to me if that is going to improve load times noticably in Wine, and also that is worth the inherent complications until anything actually depends on that \\KnownDlls sections. So instead of implementing all of that throughout the loader I added a few missing dlls to registry. The current list in this pat
chset corresponds to the contents of \\KnownDlls directory on an up to date Windows 10.
--
v4: ntdll: Load known dlls from system directory.
loader/wine.inf: Add known dlls key.
ntdll: Factor out prepend_system_dir() function.
kernel32/tests: Add tests for known dlls load specifics.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2127
Instead of https://gitlab.winehq.org/wine/wine/-/merge_requests/7815, for https://gitlab.winehq.org/wine/wine/-/merge_requests/7226, this only split the sync ops to a separate vtable and let objects delegate theirs to a separate object.
This starts using a event-like interface for most objects, leaving the decision regarding if/how to split sync themselves / integrate inproc syncs for later.
--
v7: server: Use an event sync for fd objects.
server: Introduce a new event sync object.
server: Redirect fd-based objects sync to the fd.
server: Add an operation to retrieve an object sync.
server: Move object grab/release out of (add|remove)_queue.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7848
Instead of https://gitlab.winehq.org/wine/wine/-/merge_requests/7815, for https://gitlab.winehq.org/wine/wine/-/merge_requests/7226, this only split the sync ops to a separate vtable and let objects delegate theirs to a separate object.
This starts using a event-like interface for most objects, leaving the decision regarding if/how to split sync themselves / integrate inproc syncs for later.
--
v5: server: Use an event sync for fd objects.
server: Introduce a new event sync object.
server: Redirect fd-based objects sync to the fd.
server: Add an operation to retrieve an object sync.
server: Move object grab/release out of (add|remove)_queue.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7848
This MR uses the cursor-shapes-v1 protocol to tell the compositor which system
cursor shape to use. If a shape match is not found (or cursor-shapes-v1
is not available) we fall back to setting the cursor buffer from the
Windows cursor data as before.
The second commit implements support for a "UseSystemCursors" driver option, similar
to what winex11 has. Since this is the first winewayland driver option we also introduce
all the related registry reading code.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57648
--
Side note: The registry code is a copy from winex11, and is the third copy in the
codebase (x11, mac, wayland). Perhaps it's worth introducing a common
ntuser function to perform the option reading for the drivers, something like
`NtUserGetDriverOption("X11 Driver", buffer, buffer_size, TRUE /* whether to read app specific option if present */)`.
With such a function there is the concern about each call reopening the registry, but we can see if that's actually a problem and how a different API (or some sort of caching) may help.
--
v4: winewayland: Support "UseSystemCursors" driver option.
winewayland: Use system cursor shapes when possible.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7678
For https://gitlab.winehq.org/wine/wine/-/merge_requests/7512 to use it to locate window shared objects.
--
v17: win32u: Use the session shared object for user handle entries.
win32u: Use the session shared object to implement is_window.
server: Move the user object handle table to the shared memory.
server: Allocate a session shared memory header structure.
server: Use NTUSER_OBJ constants for user object types.
server: Remove const qualifier from shared memory pointers.
include: Implement ReadAcquire64.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7610
Ensures that OpenGL content is correctly sized when DPI scaling is active (either because of a non-DPI-aware app, or display mode emulation).
Tested on M2 Pro/macOS Sequoia with a variety of games (through wined3d and with display mode emulation enabled).
Changing the OpenGL back buffer size was previously only done when the winemac `RetinaMode` was enabled in the registry, now it's always being set. It's possible this could cause problems with other GPUs/drivers.
Also, `sync_context_rect` checks whether `draw_rect_win_dpi` has changed on every call (unlike `draw_rect` which is only checked after `WindowPosChanged` sets the `view_moved` flag). This follows winex11, which checks the DPI-scaled size in every `wglSwapBuffers` call.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7979
--
v2: mshtml/tests: Test iframe window navigation resetting props.
mshtml: Get rid of useless "iter" member in the attribute collection enum.
mshtml: Expose "arguments" and "caller" from host constructors in IE9+ modes.
mshtml: Expose "caller" from host functions in IE9+ modes.
mshtml: Expose "arguments" from host functions in IE9+ modes.
jscript: Properly fill the builtin props.
mshtml: Don't redefine deleted props in dispex_define_property.
mshtml: Ignore setting non-writable external props.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7970
Fixes Country Siblings' crash on startup.
`d2d_device_context_draw` doesn't accept `D2D_TARGET_UNKNOWN` because `render_target->target.bitmap->rtv` isn't reliably set when calling `ID3D11DeviceContext1_OMSetRenderTargets`. Therefore, we check for that condition and return early.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58185
--
v3: d2d1: Fix a crash in DrawGlyphRun method family if no target is set.
d2d1: Fix a crash in FillGeometry method family if no target is set.
d2d1: Fix a crash in DrawGeometry method family if no target is set.
d2d1: Fix a crash in DrawBitmap method family if no target is set.
d2d1: Fix a crash in Clear method if no target is set.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7959
For https://gitlab.winehq.org/wine/wine/-/merge_requests/7512 to use it to locate window shared objects.
--
v16: win32u: Use the session shared object for user handle entries.
win32u: Use the session shared object to implement is_window.
server: Move the user object handle table to the shared memory.
server: Allocate a session shared memory header structure.
server: Use NTUSER_OBJ constants for user object types.
include: Implement ReadAcquire64.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7610
Fixes a specific game's crash on startup.
`d2d_device_context_draw` doesn't accept `D2D_TARGET_UNKNOWN` because `render_target->target.bitmap->rtv` isn't reliably set when calling `ID3D11DeviceContext1_OMSetRenderTargets`. Therefore, we check for that condition and return early.
--
v2: d2d1: Fix a crash in DrawGlyphRun method family if no target is set.
d2d1: Fix a crash in FillGeometry method family if no target is set.
d2d1: Fix a crash in DrawGeometry method family if no target is set.
d2d1: Fix a crash in DrawBitmap method family if no target is set.
d2d1: Fix a crash in Clear method if no target is set.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7959
The basic `FindAllAsync()` method returns a collection of `DeviceInformation` objects representing all device interfaces on the system. This MR adds a basic implementation of this method, and the associated `IDeviceInformation` and `DeviceInformationCollection` objects it returns. For `IDeviceInformation`, this MR only implements the `Id()` method, which returns the symbolic link for the registered interface.
A basic working `DeviceInformation` and `FindAll` implementation is needed to implement `DeviceWatcher`'s `Added`, `Removed` events, which in turn is required for basic device discovery in `Windows.Devices.Bluetooth`.
--
v6: windows.devices.enumeration: Create IDeviceInformation objects from all present device interfaces.
windows.devices.enumeration: Add a stubbed IDeviceInformation implementation for device interfaces.
windows.devices.enumeration: Add a stubbed implementation for FindAllAsync() and DeviceInformationCollection.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6874
This test failed on Linux 2 out of the last 67 times on test.winehq.org
because IMediaControl_GetState returned VFW_S_STATE_INTERMEDIATE,
evidently meaning that the command to pause had been received but not
yet carried out. Since pausing is an asynchronous operation in Wine's
implementation, mark the test as flaky.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7964
--
v2: shell32: Add overwrite confirmation for FO_COPY.
shell32: Remove useless bFromRelative member.
shell32: Rework FO_COPY operation.
shell32: Remove a useless index variable in parse_file_list.
shell32: Introduce file_entry_{init,destroy} helpers.
shell32: Fail if wildcards are in target file names.
shell32/tests: More use of check_file_operation helper in test_copy.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7945
On Mon May 5 22:39:51 2025 +0000, Elizabeth Figura wrote:
> Yeah. It's not quite obvious that this is actually the right thing to do
> (native doesn't always do the sensible thing), but a manual test bears
> it out, as attached. It could be made into an automatic test, but it's
> timing-dependent enough that I'm hesitant to do so.
Meh, I forgot to actually attach the test:
```
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index df1f02cfd00..cf3a86c0c2e 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -5151,9 +5151,11 @@ static void test_graph_seeking(void)
hr = IMediaControl_Run(control);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
+Sleep(6000);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(time < 5000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(time));
+ trace("%I64d\n", time);
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter1.IBaseFilter_iface);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7965#note_102623
test_graph_seeking sets the stop time to 6 seconds and then checks that
the media has stopped at that exact point in time. That test failed 10
out of the last 67 times on test.winehq.org because
IMediaSeeking_GetCurrentPosition returned a time that was 1 millisecond
after the stop time. To make the test pass consistently, clamp the
current time to the stop time.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7965
When queried by NtQueryInformationToken(TokenElevation).
---
As the test shows, a TokenElevation query is more complex than a check against the elevation type.
GOG Galaxy's updater relies on this behavior when its service is launched with a TokenElevationTypeDefault token (which doesn't currently happen, but I have patches in the works for that).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7972
The basic `FindAllAsync()` method returns a collection of `DeviceInformation` objects representing all device interfaces on the system. This MR adds a basic implementation of this method, and the associated `IDeviceInformation` and `DeviceInformationCollection` objects it returns. For `IDeviceInformation`, this MR only implements the `Id()` method, which returns the symbolic link for the registered interface.
A basic working `DeviceInformation` and `FindAll` implementations are needed to implement `DeviceWatcher`'s `Added`, `Removed` events, which in turn is required for basic device discovery in `Windows.Devices.Bluetooth`.
--
v5: windows.devices.enumeration: Create IDeviceInformation objects from all present device interfaces.
windows.devices.enumeration: Add a stubbed IDeviceInformation implementation for device interfaces.
windows.devices.enumeration: Add a stubbed implementation for FindAllAsync() and DeviceInformationCollection.
windows.devices.enumeration/tests: Add conformance tests for FindAllAsync().
https://gitlab.winehq.org/wine/wine/-/merge_requests/6874
The basic `FindAllAsync()` method returns a collection of `DeviceInformation` objects representing all device interfaces on the system. This MR adds a basic implementation of this method, and the associated `IDeviceInformation` and `DeviceInformationCollection` objects it returns. For `IDeviceInformation`, this MR only implements the `Id()` method, which returns the symbolic link for the registered interface.
--
v4: windows.devices.enumeration: Implement IIterable<IDeviceInformation *> for DeviceInformationCollection.
windows.devices.enumeration: Implement IndexOf() and GetMany() for DeviceInformationCollection.
windows.devices.enumeration: Create IDeviceInformation objects from all present device interfaces.
windows.devices.enumeration: Add a stubbed IDeviceInformation implementation for device interfaces.
windows.devices.enumeration: Add a stubbed implementation for FindAllAsync() and DeviceInformationCollection.
windows.devices.enumeration/tests: Add conformance tests for IIterable and IIterator interfaces in DeviceInformationCollection.
windows.devices.enumeration/tests: Add conformance tests for GetMany() and IndexOf() methods in DeviceInformationCollection.
windows.devices.enumeration/tests: Add conformance tests for FindAllAsync().
https://gitlab.winehq.org/wine/wine/-/merge_requests/6874
This fixes Trials Fusion often crashing when disconnecting a controller while there are more still connected.
--
v4: hidclass: Set Status for pending IRPs of removed devices to STATUS_DEVICE_NOT_CONNECTED.
ntdll/tests: Add more NtCancelIoFile[Ex]() tests.
ntdll: Wait for all pending operations to be cancelled in NtCancelIoFile[Ex]().
https://gitlab.winehq.org/wine/wine/-/merge_requests/7797
__STRINGTOLD_L expects a pointer to a `_LDOUBLE` as its first argument, which we internally declare
as `MSVCRT__LDOUBLE`. Problem is, `_LDOUBLE` is 10 bytes long, whereas `MSVCRT__LDOUBLE` is 12 bytes
long (ULONG * 3). Writing into the third ULONG is technically a buffer overflow.
Declare `MSVCRT__LDOUBLE` instead as 2 ULONGs plus a USHORT.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7961
On Fri May 2 17:55:41 2025 +0000, Elizabeth Figura wrote:
> > > I guess native is supposed to not block in that case
> >
> > That's a good point. If we have two streams call
> `IMFMediaStream::RequestSample`, then we will process them in sequence
> rather than in parallel. That is, one stream will have to wait for the
> other to receive data (as we block all other streams once the source cs
> is acquired in `source_async_commands_Invoke`).
> >
> > This MR will at least unblock a stream when there is no more data, but
> Windows probably delivers data for the other stream immediately (i.e. it
> can deliver data for one stream, even if the other was already waiting).
> And I believe I recall seeing audio latency in Wine as a result of this.
> From memory, it was a 4K video, so delivery of the video sample took a
> while and as a result the audio fell behind. We should probably look to
> lock the individual streams rather than the entire source when possible.
> Hrm, I didn't think we had a locking problem, but if we do that should
> be fixed, yeah.
I'll have a think about how I can test this. I might be able to craft a file that'll delay one of the streams long enough, that whilst waiting for a sample, I can reliably request and receive a sample on the other.
Thanks for the review.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7824#note_102482