OK, I just submitted an updated change. I spent a lot of time yesterday and today getting the logic right, testing various /O options, side by side with Windows. This looks right to me. I did abstain from cleaning up the use of the global variables. This change at least does not add any. Cleaning those up will be an exercise for (another person at) another time. Let me know what you think of the change.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7131#note_93212
@piotr The build-linux stage is still complaining about email, and I can't figure out why. I checked, and all my commits where done with the config set correctly.
I merged changes from wine/master, so, now, everything is up to date.
I'm wondering if I should close this MR and create a new one. Can you make an advice?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109#note_93189
This MR intends to add the complex numbers related functions:
* cimag
* _FCbuild
* crealf
* cimagf
These functions are defined in dlls/msvcr120/math.c and mapped in dlls/msvcr120/msvcr120.spec and dlls/ucrbase/ucrbase.spec.
The related tests were added in dlls/mscr120/tests/msvcr120.c and result were checked.
--
v6: fixed msvcr120_app spec
Revert "fixed msvcr120_app spec" because of missing user info
winex11: Attach currently active Vulkan onscreen surface in …
[View More]vulkan_surface_update_offscreen().
win32u: Don't invalidate existing Vulkan surface when a new one is created for window.
win32u: Check for NULL hwnd before calling vulkan_surface_presented() driver callback.
win32u: Nullify surface hwnd when detaching Vulkan surface.
winex11: Allow Withdrawn requests to override Iconic <-> Normal transitions.
include: Add signbit declarations for c++.
dinput: Clamp FFB effect report value to the field range.
dinput/tests: Add more tests for force feedback.
win32u: Implement NtUserPostQuitMessage().
win32u: Implement NtUserMessageBeep().
win32u: Implement NtUserEnumClipboardFormats().
win32u: Implement NtUserCreateMenu() and NtUserCreatePopupMenu().
win32u: Implement NtUserGetThreadState().
win32u: Implement NtUserReleaseCapture().
win32u: Implement NtUserDestroyCaret().
hhctrl: Use wide character string literals.
cryptui: Use wide character string literals.
ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
sapi: Remove some unnecessary traces.
sapi: Implement IStream methods for SpStream.
sapi: Implement ISpStream::GetFormat.
sapi: Implement ISpStream::Close.
sapi: Implement ISpStream::Set/GetBaseStream.
sapi: Adding missing interfaces for SpStream.
include: Use flexible array-member in some structure declarations.
include: Add a couple of definitions to mscvpdb.h.
include: Add some new definitions for dbghelp.h.
win32u: Use the first vertical alternates table regardless of script.
gdi32/tests: Add tests for script-independent vertical glyph lookup.
wineps: Use simple strings for glyph names.
wineps: Remove some unused AFM values.
wineps: Don't parse the glyph name or encoding when loading AFM files.
wineps: Don't store the glyph name or encoding for individual glyphs.
user32/tests: Add tests for WM_COPYDATA.
win32u: Allocate a separate user buffer when packing a large WM_COPYDATA message for user32.
wintypes: Stub of IRandomAccessStreamReferenceStatics interface.
wintypes: Stub of Windows.Storage.Streams.RandomAccessStreamReference runtimeclass.
wintypes: Return S_OK from data_writer_activation_factory_ActivateInstance().
wintypes: Stub of Windows.Storage.Streams.DataWriter runtimeclass.
wintypes: Reimplement Windows.Foundation.Metadata.{ApiInformation,PropertyValue} separately.
wintypes/tests: Add interface tests.
include: Don't import .idl when DO_NO_IMPORTS is defined.
shlwapi: Use wide character string literals.
winhlp32: Use wide character string literals.
tapi32: Use wide character string literals.
hhctrl: Fix spelling of "local" in OnTopicChange.
ntdll/tests: Add RtlRealSuccessor() tests.
ntdll: Implement RtlRealSuccessor().
ntdll/tests: Add RtlRealPredecessor() tests.
ntdll: Implement RtlRealPredecessor().
wine.inf: Pass command line arguments to msiexec.
wined3d: Add Nvidia RTX40xx series desktop models data.
wined3d: Add Nvidia RTX30xx series desktop models data.
prntvpt: Implement writing PageImageableSize capabilities.
prntvpt: Implement writing PageMediaSize capabilities.
wined3d/spirv: Implement alpha test.
wined3d: Feed alpha ref through a push constant buffer.
wined3d/glsl: Move legacy alpha test to shader_glsl_apply_draw_state().
wined3d/spirv: Implement flat shading.
wined3d: Use ps_compile_args in shader_spirv_compile_arguments.
wined3d: Bind the right push constant buffers when FFP is toggled.
ole32: Set property storage clsid on creation.
ole32: Fix IPropertyStorage::ReadMultiple return value when some properties are missing.
ole32: Add support for reading VT_R4 property.
secur32: Update max token size for Negotiate.
kerberos: Update sizes to match modern implementations.
propsys: Remove FIXME() from PropVariantChangeType().
kernel32/tests: Match the value in the debug message the test condition.
crypt32: Don't assert in Context_Release() on invalid refcount.
crypt32/tests: Add a test for deleting and adding certs during enumeration.
crypt32: Only remove cert from mem store list when deleting it.
crypt32: Release existing cert context in add_cert_to_store().
crypt32: Don't try to release zero-refcount context in MemStore_addContext().
crypt32: Factor out memstore_free_context() function.
crypt32: Release cert context in CertDeleteCertificateFromStore().
msvcp140: Fix field order in _Mtx_t.
msvcp140/tests: Add more tests for _Mtx_t.
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/7109
[View Less]
On Wed Jan 29 09:48:53 2025 +0000, Joe Souza wrote:
> After spending some time looking at the existing code, I find that it's
> not that far off from working properly. It correctly allows for
> multiple options to be specified on the command line, and correctly
> handles the exclusive options (i.e. of /N, /E, /S, /D, it correctly
> allows only one of these to take effect). What it gets wrong is that in
> Windows, the first of the exclusive options encountered takes
> …
[View More]precedence, where in current Wine code, it's the last exclusive option
> encountered that takes precedence. Current wine code also does not sort
> directory names for /G.
> All that in mind, the code does not need to be changed to allow multiple
> sort options to be passed to the qsort algorithm. We could clean up the
> use of global variables a bit, sort the directory names for /G, and fix
> the code such that /O by itself is implied /O:NE (which my prior
> proposed change did).
agreed
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7131#note_93185
[View Less]
Which is use after free since commit 278437b266ed97cebb8e1c14be6cfa2c4f440f07.
Thanks Bernhard Übelacker for spotting this (based on ASan validation).
For a general case I'd say we can have some tests intentionally doing use after free but it is not needed here.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7218
This PR updates the behaviour of `NtQueryDirectoryFile`, bringing it in line with current Windows behaviour. The need for this update was discovered when attempting to build the Unreal Engine with MSVC under Wine. In certain cases conditional include statements do not behave as expected, due to MSVC depending on undocumented behaviour of `NtQueryDirectoryFile`.
We ran tests on multiple versions of Windows, and discovered that the behaviour has changed since the original Wine implementation, …
[View More]but the documentation has not. The source code for our test tool, and a set of results can be found [here](https://github.com/TensorWorks/NtQueryDirectoryFile-Test). As of Windows 8, calling `NtQueryDirectoryFile` with a re-used handle, a new mask, and setting the `RestartScan` flag to True, causes the cached results to be erased and a new scan to be performed with the updated mask. Currently, Wine performs as did earlier versions of Windows, where the changed mask is ignored, and the cache is reused. This can cause `NtQueryDirectoryFile` under Wine to falsely report that files exist, when they do not.
This PR corrects this behaviour, invalidating the cache when required. Implementing this exposed further undocumented behaviour of `NtQueryDirectoryFile`, where a search for a non-existent file will return either `STATUS_NO_MORE_FILES` or `STATUS_NO_SUCH_FILE`, depending on whether or not the handle had been previously used regardless of the value of `RestartScan`. This was reflected in a `winetest` which allowed for the response to be either `STATUS_SUCCESS` or `STATUS_NO_MORE_FILES`.
This patch also adds unit tests for the new behaviour of `NtQueryDirectoryFile`. These tests pass when running `winetest` under Windows, and under Wine with these changes in place, but they will fail under older versions of Wine. If run under older versions of Windows the test suite will detect that this functionality is not supported, and will not run the updated tests.
--
v7: ntdll: Update NtQueryDirectoryFile to purge cache if scan is reset with a new mask
ntdll: Test updated NtQueryDirectoryFile mask reset behaviour
https://gitlab.winehq.org/wine/wine/-/merge_requests/6904
[View Less]
I know it's been a year, but I'm not sure where else would be best to ask this, so:
Are there plans to support XDG_DECORATION in WINE ~11, and will it prefer SSDs on the application-side?
Aside from that, for those who have to deal with the CSD titlebars, is there any desire to upgrade the CSDs from Windows Classic to Windows Basic CSDs? All the textures for Windows Basic exist in Windows XP msstyles, afterall, given Windows Basic derivatives from Windows XP's window manager afterall, and …
[View More]this solution would also ensure consistency with programs that use Windows Basic's textures such as Mozilla Firefox.
Upgrading the CSDs to Windows Basic, especially now they're exposed to users as a requirement in GNOME, would likely be the preferred way, for users of visual styles, to have the CSDs be improved, would still provide the opportunity for WINE to have its own custom window decorations due to the WINE Visual Style, and would also preserve the Windows Classic CSDs for users who opt out of Visual Styles entirely. If GNOME CSDs are desired later down the line, those could be supplied via the "Use GTK+ theme as Visual Style" experiment or new Wine Configuration option.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3909#note_93141
[View Less]
--
v2: winex11.drv: Attach currently active Vulkan onscreen surface in vulkan_surface_update_offscreen().
win32u: Don't invalidate existing Vulkan surface when a new one is created for window.
win32u: Check for NULL hwnd before calling vulkan_surface_presented() driver callback.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7219
After spending some time looking at the existing code, I find that it's not that far off from working properly. It correctly allows for multiple options to be specified on the command line, and correctly handles the exclusive options (i.e. of /N, /E, /S, /T, it correctly allows only one of these to take effect). What it gets wrong is that in Windows, the first of the exclusive options encountered takes precedence, where in current Wine code, it's the last exclusive option encountered that …
[View More]takes precedence. Current wine code also does not sort directory names for /G.
All that in mind, the code does not need to be changed to allow multiple sort options to be passed to the qsort algorithm. We could clean up the use of global variables a bit, and sort the directory names for /G.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7131#note_93086
[View Less]
> We don't do that for all devices and it's not clear to me what we would gain by doing so.
Well, it'd be significantly more correct. That often counts for a lot.
As far as I can think of, the only devices for which we don't use the PnP architecture, and instead perform this kind of hack, are the GPU devices. That's because they're kind of tied to the explorer process rather than being able to be enumerated from winedevice.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7213#note_93082
@piotr I shall admit I'm a bit confused by the fork way of working and the wine CI.
I previously made some rebase, but now, when I click on the rebase button, nothing happens.
I didn't want to bother you before the windows build pipelines were successful, but your offer is welcomed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109#note_93055
The patches needs to be rebased on top of current master. You will also need to merge the patches/reverts and get rid of the merges. I have requested access to your repository if you need help with that.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109#note_93054
On Mon Jan 27 21:05:00 2025 +0000, Alexandre Julliard wrote:
> Actually _Cbuild has the same problem, but it's less obvious since it
> will break only on non-x86 platforms.
Hello. Thanks for the clarification!
=> Change of Cbuild then.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109#note_93053
On Mon Jan 27 21:05:00 2025 +0000, Stéphane Bacri wrote:
> Hello, Piotr.
> Thanks for your review and comments. However, I'm unsure the issue is
> there (and I have no other clue, because no window machine nor VM). I
> agree that [MS
> documentation](https://learn.microsoft.com/en-us/cpp/c-runtime-library/refe…
> defines the signature you mention, but it is the same for _Cbuild, and I
> used it as a template. I could have suspected the entries crealf(int64)
> & …
[View More]cimagf(int64) to be the cause if it had been a 32 vs 64 bit issue. But
> I don't understand why the difference is between windows & linux.
> Moreover, I checked the stage log, and I see only zeroes in the failing
> tests reports, which is weird, even with params size issues).
> By the way, the positive thing is I figured out that
> msvcr120_app/msvcr120_app.spec had to be updated. However, the current
> build-linux stage seems to fail for reasons not related to the branch (I
> tried to revert a commit then commit back after setting again my user
> name & email, and still fails saying email not set when other stage do
> not complain).
Actually _Cbuild has the same problem, but it's less obvious since it will break only on non-x86 platforms.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109#note_92977
[View Less]
Hello, Piotr.
Thanks for your review and comments. However, I'm unsure the issue is there (and I have no other clue, because no window machine nor VM). I agree that [MS documentation](https://learn.microsoft.com/en-us/cpp/c-runtime-library/refe… defines the signature you mention, but it is the same for _Cbuild, and I used it as a template. I could have suspected the entries crealf(int64) & cimagf(int64) to be the cause if it had been a 32 vs 64 bit issue. But I don't understand why the …
[View More]difference is between windows & linux.
Moreover, I checked the stage log, and I see only zeroes in the failing tests reports, which is weird, even with params size issues).
By the way, the positive thing is I figured out that msvcr120_app/msvcr120_app.spec had to be updated. However, the current build-linux stage seems to fail for reasons not related to the branch (I tried to revert a commit then commit back after setting again my user name & email, and still fails saying email not set when other stage do not complain).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109#note_92974
[View Less]
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: …
[View More]STATUS_SUCCESS or STATUS_USER_APC
--
v12: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
[View Less]
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: …
[View More]STATUS_SUCCESS or STATUS_USER_APC
--
v11: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
[View Less]
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v2: dlls/oleaut32: Add DeleteTypeInfo() base-cases in typelib.c
https://gitlab.winehq.org/wine/wine/-/merge_requests/7203
Mostly adding a couple of missing bits. Regarding the 32-bit KDHELP structure definition:
- I checked against some SDK:s back to 2000, and the overall size of this structure hasn't changed ever since (some fields have been added with decreasing Reserved array size)
- so it's really Wine's header which were missing these fields not the callers
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7206
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: …
[View More]STATUS_SUCCESS or STATUS_USER_APC
--
v10: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
[View Less]
On Mon Jan 27 16:37:50 2025 +0000, Akihiro Sagawa wrote:
> @huw, I have been waiting for your review for several months. Do you
> have any concerns?
Looks good. By the time it was ready, it was too late in the release cycle.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5633#note_92949
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: …
[View More]STATUS_SUCCESS or STATUS_USER_APC
--
v9: ntdll: Fix the return value of NtDelayExecution.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
[View Less]
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: …
[View More]STATUS_SUCCESS or STATUS_USER_APC
--
v8: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
[View Less]
This MR intends to add the complex numbers related functions:
* cimag
* _FCbuild
* crealf
* cimagf
These functions are defined in dlls/msvcr120/math.c and mapped in dlls/msvcr120/msvcr120.spec and dlls/ucrbase/ucrbase.spec.
The related tests were added in dlls/mscr120/tests/msvcr120.c and result were checked.
--
v3: fixed msvcr120_app spec
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109
This allows using one single wineprefix, one wineserver and one single wine executable for running both arm and arm64 executables.
This setup actually has worked earlier; Ubuntu 22.04 packages Wine 6.0, where the wine32 + wine64 packages together end up working this way. However, since Wine 6.0, a couple of refactorings has broken this setup along the way; reinstate this way of working.
The new wow64 mode probably won't work on arm, as it's not easily possible to switch between 32 and 64 bit …
[View More]execution mode within a process, as far as I know, but the old wow64 mode is still a great convenience - especially considering distro-packaged use for users who aren't familiar with the particular quirks on this architecture.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7204
[View Less]
--
v5: crypt32: Don't assert in Context_Release() on invalid refcount.
crypt32/tests: Add a test for deleting and adding certs during enumeration.
crypt32: Only remove cert from mem store list when deleting it.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7193
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7203
If application sends out-of-range values for FFB effects, they become -1, which is undesireable, when -1 is in the physical range of the field and being sent to the device. This patch fixes it, clamping values to the field range. Clamping was earlier implemented [here](https://gitlab.winehq.org/wine/wine/-/blob/wine-6.19/dlls/dinput/effe… in 6.19. Windows does this clamping silently, and doesn't fail `SetParameters` call when values is out of range.
Affected application is Assetto Corsa EVO, …
[View More]which with default settings sends out ConstantForce magnitude under/over [documented](https://learn.microsoft.com/en-us/previous-versions/ms835644(v=… \[-10000, 10000\]. [Link to the discussion with some investigation on Steam](https://steamcommunity.com/app/3058630/discussions/0/756142145462617….
In this submission scaling and clamping were moved to the separate `scale_and_clamp_value` function, which is now called every time from `set_parameter_value`. To avoid regression with sending `-1` for the infinite duration effects, separate function `set_parameter_value_no_scaling` created. Gain values in `hid_joystick_send_device_gain` are also scaled and clamped.
--
v3: dinput: Clamp FFB effect report value to the field range.
dinput/tests: Add more tests for force feedback.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7161
[View Less]
Added Constant Force tests, with out-of-bounds Magnitude levels. Also updated Condition Effect tests, now includes Saturation field being out-of-bounds. Tests are passing on Windows. That required modifying test HID descriptor, to include new effect type (Constant) and usage (Magnitude).
Now we have an option to not clamp specific fields, specifically - Saturation ones.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7161#note_92866