Also introduce the header `ws2bth.h` alongside the necessary constants for `AF_BTH` addresses in `ws2def.h`.
--
v2: ws2_32/tests: Add tests for Bluetooth addresses for WSAStringToAddress().
ws2_32: Implement WSAAddressToString() for Bluetooth (AF_BTH) addresses.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7504
This is the continuation of https://gitlab.winehq.org/wine/wine/-/merge_requests/7317.
There are a lot of smaller commits (some even no-op renames), because there are some inconsistencies in the codebase currently of what an NT thread priority vs a base thread priority should be and I hope that this clears that up a bit.
I tried making the commits as atomic as possible I hope this is fine... There are still a few tiny details missing like fixing up the `list_processes` request and `…
[View More]KeSetPriorityThread` and friends which are either stubs or not correctly working as well.
There are also probably a few tests that can be written here (after thread priority boosting has been disabled, cause that makes the behavior on windows very flaky and dynamic). In fact on windows there is some thread priority boost decay going on after the message has been processed (and probably other boosting mechanisms), which this MR does not properly capture, but are also probably not reasonable to implement.
This also reverts the commits of https://gitlab.winehq.org/wine/wine/-/merge_requests/1232, which are being effectively overwritten anyways.
The `get_thread_priority_info` request was added, because the reply in `get_thread_info` would be otherwise larger than 64 bytes, so it had to be split.
--
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7516
[View Less]
I add 5 tests to test_http_connection().
The first test sends "Expires: 0", the second test sends "Expires: -1", the third test sends "Expires: 100", the fourth test sends "Expires: invalid date", the fifth test sends "Expires: Thu, 06 Mar 2025 06:08:11 GMT".
The tests on actual windows 10 has output informations, such as:
```null
http.c:6837: expires: 2025-03-06 06:14:13, current time: 2025-03-06 06:14:13, server response expires: 0
http.c:6837: expires: 2025-03-06 06:14:14, current time: …
[View More]2025-03-06 06:14:14, server response expires: -1
http.c:6837: expires: 2025-03-06 06:14:14, current time: 2025-03-06 06:14:14, server response expires: 100
http.c:6837: expires: 2025-03-06 05:14:15, current time: 2025-03-06 06:14:15, server response expires: invalid date
http.c:6837: expires: 2025-03-06 06:08:11, current time: 2025-03-06 06:14:15, server response expires: Thu, 06 Mar 2025 06:08:11 GMT
```
I think Windows treats all numbers as invalid values and sets the expiration time to the current system time, while other invalid values set the expiration time to one hour before the current system time, and valid expiration times use the set expiration time.
In Wine, handling inconsistencies with Windows 10, We treat "0" as "1601-01-01 00:00:00", and all other invalid values as 10 minutes after the current system time. such as
```coffeescript
http.c:6837: expires: 1601-01-01 00:00:00, current time: 2025-03-06 06:10:56, server response expires: 0
0118:err:wininet:HTTP_ParseDateAsAsctime unexpected weekday L"-1"
0118:err:wininet:HTTP_ParseDate unexpected date format L"-1"
http.c:6837: expires: 2025-03-06 06:20:56, current time: 2025-03-06 06:10:57, server response expires: -1
0110:err:wininet:HTTP_ParseDateAsAsctime unexpected weekday L"100"
0110:err:wininet:HTTP_ParseDate unexpected date format L"100"
http.c:6837: expires: 2025-03-06 06:20:56, current time: 2025-03-06 06:10:57, server response expires: 100
0118:err:wininet:HTTP_ParseDateAsAsctime unexpected weekday L"inv"
0118:err:wininet:HTTP_ParseDate unexpected date format L"invalid date"
http.c:6837: expires: 2025-03-06 06:20:56, current time: 2025-03-06 06:10:58, server response expires: invalid date
http.c:6837: expires: 2025-03-06 06:08:10, current time: 2025-03-06 06:10:58, server response expires: Thu, 06 Mar 2025 06:08:11 GMT
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7323#note_96954
[View Less]
In my last ASan run below report showed up.
Maybe manifests also as crashes in https://test.winehq.org/data/patterns.html#setupapi:diskspace
Contains also a little patch reversing the message in two `ok` statements.
```
=================================================================
==setupapi_test.exe==3900==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0xbebebebe in thread T0
#0 0x7a102bdb in free /home/runner/work/llvm-mingw/llvm-mingw/llvm-project/…
[View More]compiler-rt\lib/asan/asan_malloc_win.cpp:71:3
#1 0x78a6311c in SetupDestroyDiskSpaceList .../wine/dlls/setupapi/diskspace.c:246:5
#2 0x0042572a in test_SetupDuplicateDiskSpaceListA .../wine/dlls/setupapi/tests/diskspace.c:216:8
#3 0x00424ab1 in func_diskspace .../wine/dlls/setupapi/tests/diskspace.c:765:5
#4 0x0044f493 in run_test .../wine/include/wine/test.h:765:5
#5 0x0044f035 in main .../wine/include/wine/test.h:884:12
#6 0x004506de in mainCRTStartup .../wine/dlls/msvcrt/crt_main.c:58:11
#7 0x7bcc0f0f in BaseThreadInitThunk (C:\windows\system32\kernel32.dll+0x7b820f0f)
#8 0x7be31dc2 in call_thread_func_wrapper (C:\windows\system32\ntdll.dll+0x7bc41dc2)
#9 0x7be326c9 in call_thread_func .../wine/dlls/ntdll/signal_i386.c:524:9
Address 0xbebebebe is a wild pointer inside of access range of size 0x00000001.
SUMMARY: AddressSanitizer: bad-free .../wine/dlls/setupapi/diskspace.c:246:5 in SetupDestroyDiskSpaceList
```
Testbot run with this two patches: https://testbot.winehq.org/JobDetails.pl?Key=151644
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7501
[View Less]
--
v2: wined3d: Create a Vulkan video session backing the wined3d_decoder_vk.
wined3d: Look for a video decode queue.
d3d11: Create a wined3d_decoder object backing the d3d11 decoder object.
wined3d: Introduce a Vulkan decoder backend.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7480
Many applications request and use GL configs with alpha, but assume that
the windowing system will present their surfaces opaquely. Wayland
compositors normally respect the alpha channel, which leads to unwanted
translucency effects for such applications, so we use the
EGL_EXT_present_opaque extension to avoid this.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57800
--
Note that this has been a known issue since the initial GL support in winewayland (see description of https://gitlab.…
[View More]winehq.org/wine/wine/-/merge_requests/5264). At that point I didn't enable the opaque attribute because there was a bug in Mesa that could cause a crash for some 16bpp formats. I fixed the bug in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28153, and the fix got released in 24.2.0 (Aug 2024). This Mesa version (or newer) is now either part of the latest version of most major distributions or available through official updates/backports (from what I see OpenSUSE Leap is a notable exception), so I now feel more comfortable enabling the attribute by default. Some users using older Mesa versions may be affected, but I think most people trying out the latest Wine 10.x will already be (or can move to) to newer Mesa versions anyway.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7500
[View Less]
These defines were only introduced to GStreamer in version 1.20; thus
compiling against earlier versions causes a compilation error.
This commit replaces the defines with their respective expansions.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7492
--
v3: include: Fix wmemchr C++ warning.
include: Fix InlineIsEqualGUID C++ warning.
include: Add some _BitScanForward(64) declarations in intrin.h.
include: Add a __shiftright128 intrinsic definition.
include: Add a _umul128 intrinsic definition.
include: Move FILE_DISPOSITION_INFO after DeleteFile(A|W).
include: Add a MB_CUR_MAX definition in ctype.h.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6752
Current code requires entering a newline character in order to continue past DIR /P prompts. This change allows any key to be pressed instead.
Code to handle this was similar to existing WCMD_pause() so we leveraged that code for this purpose as well. Key to the fix was the removal of ENABLE_LINE_INPUT from the console flags, and ENABLE_PROCESSED_INPUT was added in order to preserve the ability to abort the operation via Ctrl-C.
--
v36: cmd: Allow any key to continue past DIR /P pauses.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7400
This MR adds the IMFTransform interface to the mp3dmod module so that it can be used as an MFT.
It also calls `MFTRegister` (so the MFT can be found via `MFTEnum`) and also registers a byte stream handler for the mp3 format.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7493
On Wed Mar 5 01:20:21 2025 +0000, Brendan McGrath wrote:
> I was able to resolve this by copying the defines to our code (and
> declaring them if GStreamer version is < 1.20):
> [winegstreamer.patch](/uploads/caf23dfb5e167f828b2709b17eb519fb/winegstreamer.patch)
> I'm not sure that's the way we want to go; but I'll raise an MR with
> that (and I'll close it if there's a better option).
I've raised MR !7492. In the end I decided expansion was the better option.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7288#note_96829
Fix the issue where some installers refuse to launch,
due to `SHGetKnownFolderPath()` failing when called with
`FOLDERID_UserProgramFiles`.
--
v2: shell32/tests: add tests to get path of FOLDERID_USerProgramFiles
shell32: mark FOLDERID_UserProgramFiles as CSIDL_Type_User
https://gitlab.winehq.org/wine/wine/-/merge_requests/7490
On Wed Mar 5 01:20:21 2025 +0000, Brendan McGrath wrote:
> I just tried to build this in a container running debian bullseye and
> got the following error:
> ```
> ../../dlls/winegstreamer/wg_transform.c:68:50: error: expected ')'
> before string constant
> 68 | GST_ELEMENT_REGISTER_DEFINE(winegstreamerstepper,
> "winegstreamerstepper", GST_RANK_NONE, GST_TYPE_WG_STEPPER);
> | ^~~~~~~~~~~~~~~~~~~~~~~
> | …
[View More] )
> ```
> I _think_ that's because bullseye is running gstreamer version 1.18,
> whilst the documentation suggests `GST_ELEMENT_REGISTER_DEFINE` was
> added version 1.20.
> I think we'll need to address this as I _think_ Crossover is built
> against bullseye.
I was able to resolve this by copying the defines to our code (and declaring them if GStreamer version is < 1.20):
[winegstreamer.patch](/uploads/caf23dfb5e167f828b2709b17eb519fb/winegstreamer.patch)
I'm not sure that's the way we want to go; but I'll raise an MR with that (and I'll close it if there's a better option).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7288#note_96820
[View Less]
I just tried to build this in a container running debian bullseye and got the following error:
```
../../dlls/winegstreamer/wg_transform.c:68:50: error: expected ')' before string constant
68 | GST_ELEMENT_REGISTER_DEFINE(winegstreamerstepper, "winegstreamerstepper", GST_RANK_NONE, GST_TYPE_WG_STEPPER);
| ^~~~~~~~~~~~~~~~~~~~~~~
| )
```
I _think_ that's because bullseye is running …
[View More]gstreamer version 1.18, whilst the documentation suggests `GST_ELEMENT_REGISTER_DEFINE` was added version 1.20.
I think we'll need to address this as I _think_ Crossover is built against bullseye.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7288#note_96816
[View Less]
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v5: windowscodecs: Implement GetPreferredVendorGUID().
windowscodecs/metadata: Implement GetClassID().
windowscodecs/tests: Add some tests for metadata handler GetClassID().
windowscodecs/metadata: Replicate original stream position when creating writer instances from readers.
windowscodecs/metadata: Restore original stream position on GetStream().
windowscodecs/tests: Add some tests for stream …
[View More]position handling when nested readers are used.
windowscodecs: Implement CreateQueryWriterFromReader().
windowscodecs/metadata: Do not decorate 'wstr' items with a type name in returned queries.
windowscodecs/tests: Add some more tests for query enumeration.
windowscodecs: Implement query strings enumerator.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7407
[View Less]
This patch series reworks `D3DXSaveSurfaceToFileInMemory()` to use the new `d3dx_save_pixels_to_memory()` function.
It also adds support for selecting a replacement pixel format when the image file format being saved to doesn't have direct support for the pixel format being saved. The code for calculating the best replacement format was inspired by the code in `check_texture_requirements()` in `d3dx9_36/texture.c`. This should fix WineHQ bug 51584, but I haven't tested that.
--
v2: d3dx9: …
[View More]Add support for saving DIB files in d3dx_save_pixels_to_memory().
d3dx9: Add support for saving paletted pixel formats in d3dx_pixels_save_wic().
d3dx9: Add support for saving BMP files in d3dx_save_pixels_to_memory().
d3dx9: Add support for saving JPG files in d3dx_save_pixels_to_memory().
d3dx9: Add support for saving PNG files in d3dx_save_pixels_to_memory().
https://gitlab.winehq.org/wine/wine/-/merge_requests/7436
[View Less]
If the lock is deactivated, mouselook won't work properly, and the user
probably doesn't want mouselook to be active. For example:
* if the user is making their compositor inhibit constraints to
temporarily prevent applications from disrupting pointer movement.
* if the keyboard is unfocused on the window, the lock is almost
certainly deactivated.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56681
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7475
`WINE_UNICODE_NATIVE` handles non-PE targets where appropriate, but on PE targets, we should always use `wchar_t`. This is particularly important for C++, where `wchar_t` is a distinct built-in type.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7488
On Tue Mar 4 12:15:46 2025 +0000, Bernhard Übelacker wrote:
> Sorry, this was not my intention. This line should make sure
> `check_PropVariantToBSTR2` is never called with anything else than
> `VT_R4`, but I have not considered this to be inside a `todo_wine` altogether.
> I created !7487 to fix this.
No worries, thanks for the fix :)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7460#note_96759
On Tue Mar 4 12:15:46 2025 +0000, Rémi Bernon wrote:
> This now causes a "Test succeeded inside todo block" test failure on linux.
Sorry, this was not my intention. This line should make sure `check_PropVariantToBSTR2` is never called with anything else than `VT_R4`, but I have not considered this to be inside a `todo_wine` altogether.
I created !7487 to fix this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7460#note_96755
Cannot use always succeeding ok statement,
because check_PropVariantToBSTR2 is used inside a todo_wine block.
Followup to a1637b167f.
This was intended to make sure check_PropVariantToBSTR2 is just called with `VT_R4`, but makes now more problems than good.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7487
This is an adjustment of 7324.
d3d9:visual already has a test that's relatively close to what a simplified
version of the tests in 7324 looked like, so I made the few changes to expand
that test to match and then ported it to ddraw.
Implementation-wise, this removes the SD/HD difference (which only exists on
NVidia and is not necessary to improve the mentioned application).
It also removes the clamping of YUV values, which as the tests show is not
correct.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7416
## 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 …
[View More]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.
--
v10: winegstreamer: Avoid large buffer pushes in wg_transform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7288
[View Less]
`AdjustWindowRect(Ex)` were using the system DPI even in non-DPI-aware applications, leading to some bizarre behavior.
An easy test for this is to remove the DPI awareness from `winemine`'s manifest, set the system DPI to 192, then run `winemine` and click the smiley face. Every click on the smiley face will move the window up by ~30 pixels.
A copy of ioquake3 with DPI awareness removed would also constantly enlarge its window vertically.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7478
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 …
[View More]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.~~
--
v6: winewayland: Implement SetCursorPos via pointer lock.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7353
[View Less]
This MR fixes a mf:transform test that started failing as a result of MR !7417.
It also adds new tests to mf:transform to test different values of `MF_MT_USER_DATA` against the aac decoder.
It adds validation of `cbSize` to the aac decoder, which, in addition to fixing the previous test, allows some of these new tests to pass. But it does not validate the content of the user data (as the new tests seem to indicate Windows does).
--
v2: winegstreamer: Validate the value of cbSize in aac …
[View More]decoder.
mf/tests: Test different length user_data against aac decoder.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7465
[View Less]