On Tue May 21 12:09:30 2024 +0000, eric pouech wrote:
> I'd rather see this outside the do/while loop (and moreover, the second
> count down shall be printed after this message)
Yes, but it only overrides the "Waiting for %s seconds" part, which mostly matches Windows' behavior (from the cursor position). The only difference is that Windows will end at "Waiting for N". While it's possible to replicate this, I believe it may cause issues with translations.
I can move it outside the do/while loop though.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5691#note_71014
On Tue May 21 10:23:40 2024 +0000, eric pouech wrote:
> why do you need float operations here? (int)(ticks_remaining / 1000)
> should do
It needs to be rounded because otherwise it will start with printing "Waiting for N-1 seconds" due to one or more ticks having elapsed (at least on my machine). But yes, I could do an int roundup instead (`(ticks_remaining + 500) / 1000`).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5691#note_71013
eric pouech (@epo) commented about programs/timeout/timeout_main.c:
> +
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <string.h>
> +#include <conio.h>
> +#include <math.h>
> +
> +#include <windows.h>
> +
> +#include "resources.h"
> +
> +#include <wine/debug.h>
> +
> +WINE_DEFAULT_DEBUG_CHANNEL(timeout);
> +
> +static char* get_string(int which)
a couple of remarks here (about the helpers for printing):
- returning ASCII strings could lose some bits in conversion, so you'd be safer keeping unicode string
- also usage of (w)printf can lack flexibility in translations (it assumes all parameters have the same order whatever the translation). FormatMessage brings more flexibility as you can change the order of parameters in output.
- and likely RPRINTF_VA could be rewritten as a function and not a macro
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5691#note_71012
On Tue May 21 09:53:24 2024 +0000, eric pouech wrote:
> to be pedantic, native only allows one timeout value and prints error
> when two are given
using strtol would be better and save you the str_is_number helper
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5691#note_71008
--
v3: quartz: Hold the streaming lock while calling ICDecompressEnd.
quartz: Use the correct stride when calculating image size in AVIDec.
quartz: Get output format from source, not sink in AVIDec.
quartz/tests: Use unaligned width in AVIDec tests to expose incorrect stride calculation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5674
On Mon May 20 21:34:08 2024 +0000, eric pouech wrote:
> agreed (except perhaps for the padding of the N seconds... not that it
> would make sense to replicate the padding, but I'm not sure the printf
> has a trailing whitespace so that it erases the last visible char when
> the width of N is reduced)
I've added the padding, and replicated the behavior of the native program by only updating the "Waiting for N seconds" text.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5691#note_70991
--
v2: quartz: Hold the streaming lock while calling ICDecompressEnd.
quartz: Use the correct stride when calculating image size in AVIDec.
quartz: Get output format from source, not sink in AVIDec.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5674
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44863
The bug has been fixed already by moving ddraw4 vertex buffers into
system memory. Changing this value makes the game create a smaller
buffer, which makes the game fast on video memory buffers. I think we
should stay close to what Windows drivers report even though we
mitigated the original issue in a different way.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5687
This MR improves the handling of numpad keys for drivers using KBDTABLES (only the Wayland driver at this point). It achieves this by:
1. Allowing drivers to send only the scancode in keyboard events, with win32u performing the scan->vkey mapping internally. A nice side effect of this change is that it fixes a few user32 input test TODOs.
2. Enhancing wineserver to read extended KBD vkey attributes and perform numpad key mapping depending on modifier state.
3. Providing default VK_NUMPAD* -> WCHAR mappings in win32u.
--
v7: winewayland.drv: Populate vkey to wchar entry for VK_DECIMAL.
user32/tests: Add tests for SendInput with numpad scancodes.
server: Send numpad virtual keys if NumLock is active.
win32u: Store the full KBD vkey information in kbd_tables_init_vsc2vk.
win32u: Allow drivers to send only the scan code for keyboard events.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5601
This MR improves the handling of numpad keys for drivers using KBDTABLES (only the Wayland driver at this point). It achieves this by:
1. Allowing drivers to send only the scancode in keyboard events, with win32u performing the scan->vkey mapping internally. A nice side effect of this change is that it fixes a few user32 input test TODOs.
2. Enhancing wineserver to read extended KBD vkey attributes and perform numpad key mapping depending on modifier state.
3. Providing default VK_NUMPAD* -> WCHAR mappings in win32u.
--
v6: winewayland.drv: Populate vkey to wchar entry for VK_DECIMAL.
user32/tests: Add tests for SendInput with numpad scancodes.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5601
In update_external_font_keys(), remove the fonts from the registry
immediately after we mark them for deletion, and then proceed to add or
update values in the registry.
This prevents a font from being marked as deleted, then being updated in
the registry, and then removed from the registry regardless. When this
happened, the registry would not contain the value for this font that we
intended to update it with. This function would need to run again for
this value to be added to the registry, but since this function runs
during initialization, this means that a subsequent launch of wine was
necessary. By removing the old value from the registry first, and then
adding the new one, the initialization process becomes idempotent
starting from the first run.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5684
On Sat May 18 08:22:49 2024 +0000, Piotr Caban wrote:
> Did you consider changing `get_args` prototype to something like:
> `static char* get_args(struct parsed_symbol* sym, BOOL func)`? I think
> that `z_term` argument name is not very descriptive. `open_char` and
> `close_char` seems to be redundant.
yes I thought about it (with same reasoning as yours). Didn't do it at once because I wondered where to put the open/closing argument (keep it inside get_args() as it is today or move it to caller site) and I wanted to cover the throw clauses that we don't handle yet first (to check the impacts -if any- in handling of end of parameters' type list marker).
will include in next round if it fits well.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5675#note_70879
This is based on work done by Andrew Eikum. It has been in some form in Proton for the last 4 years.
If server's sampling rate is not 48kHz **DOOM Eternal** will try to set it 48kHz for the streams using the implemented interface. There's a whole class of audio devices that use 44.1kHz sampling rate and at least PulseAudio / PipeWire tends to inherit the value from the hardware to avoid resampling. The value can also be overridden by the user via the audio server's config files.
In such cases, if the interface is not present or stubbed, this results in **audio underruns and noticeable crackling**.
It's easy to test with pipewire-pulse:
```
$ cat /etc/pipewire/pipewire.conf.d/sample-rate.conf
context.properties = {
default.clock.rate = 41100
}
```
With PulseAudio this should be doable via setting `default-sample-rate = 41100` in `/etc/pulse/daemon.conf`.
--
v3: winepulse.drv: Implement set_sample_rate.
mmdevapi: Implement AudioClockAdjustment_SetSampleRate.
mmdevapi: Add stub IAudioClockAdjustment implementation.
mmdevapi/tets: Add more IAudioClock tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5585
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56674
Now that we write all the display modes as a blob, we also write their header to the registry. This includes the dmSize field which is later used to iterate the modes after they've been read from the registry. The virtual desktop mode and some drivers were not setting it properly.
--
v2: winemac: Set DEVMODEW dmSize field.
wineandroid: Set DEVMODEW dmSize field.
win32u: Set DEVMODEW dmSize field.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5679
This format is used by many Unity games, with D3D-enabled source reader.
--
v7: mfreadwrite/reader: Fixup MFVideoFormat_ABGR32 subtype to enumerate the video processor.
winegstreamer: Support MFVideoFormat_ABGR32 output in the video processor.
mfreadwrite/tests: Add tests with MFVideoFormat_ABGR32 output format.
mf/tests: Add video processor tests with MFVideoFormat_ABGR32 format.
mfplat: Add MFVideoFormat_ABGR32 format information.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5626
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v40: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open the desktop shared object in NtUserSetThreadDesktop.
server: Return the desktop object locator in (get|set)_thread_desktop.
server: Allocate shared session object for desktops.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
This format is used by many Unity games, with D3D-enabled source reader.
--
v4: mfreadwrite/reader: Fixup MFVideoFormat_ABGR32 subtype to enumerate the video processor.
winegstreamer: Support MFVideoFormat_ABGR32 output in the video processor.
mfreadwrite/tests: Add tests with MFVideoFormat_ABGR32 output format.
mf/tests: Add video processor tests with MFVideoFormat_ABGR32 format.
mfplat: Add MFVideoFormat_ABGR32 format information.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5626
On Thu May 16 13:27:46 2024 +0000, eric pouech wrote:
> I see your point. Note that the other way around (pseudo "datatypes" for
> function in template argument list) is not correctly detected either
> (eg. in `"?AU?$my_iter@H$0A@Z@@"`)
> and goes down to demangle_datatype
> so I think we should be symmetrical between functions' arg list and
> template arg list
> and hence:
> - move out of demangle_datatype non real data types ($$V as you did, Z
> for ...)
> - handle the end of list cases before calling demangle_datatype
> something like this could do [err](/uploads/314e62b635f2bfcfce46544ac03aaef1/err)
> (not ready for inclusion yet: we don't have test for generating template
> arg list as '<>')
Yes, I think it's better to also move Z and X handling out of demangle_datatype.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5646#note_70684
This format is used by many Unity games, with D3D-enabled source reader.
--
v3: mfreadwrite/reader: Fixup MFVideoFormat_ABGR32 subtype to enumerate the video processor.
winegstreamer: Support MFVideoFormat_ABGR32 output in the video processor.
mfreadwrite/tests: Add tests with MFVideoFormat_ABGR32 output format.
mf/tests: Add video processor tests with MFVideoFormat_ABGR32 format.
mfplat: Add MFVideoFormat_ABGR32 format information.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5626
On Wed May 15 17:36:27 2024 +0000, Piotr Caban wrote:
> This marker is specific to templates so it doesn't really belong to
> `demangle_datatype` function. The patch you have proposed e.g.
> incorrectly demangles `??__K_l@@YA?AUCC@@I$$VI@Z`.
I see your point. Note that the other way around (pseudo "datatypes" for function in template argument list) is not correctly detected either (eg. in `"?AU?$my_iter@H$0A@Z@@"`)
and goes down to demangle_datatype
so I think we should be symmetrical between functions' arg list and template arg list
and hence:
- move out of demangle_datatype non real data types ($$V as you did, Z for ...)
- handle the end of list cases before calling demangle_datatype
something like this could do [err](/uploads/314e62b635f2bfcfce46544ac03aaef1/err)
(not ready for inclusion yet: we don't have test for generating template arg list as '<>')
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5646#note_70661
On Thu May 16 13:27:29 2024 +0000, Rémi Bernon wrote:
> Yes it doesn't send patches if there's not diff. If you want to test
> things on the testbot you can also directly submit patch files on
> https://testbot.winehq.org/Submit.pl (you need to register first).
Thanks for the info, I have requested an account. I see that you already scheduled a manual run so thanks for that too :)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5652#note_70662
Now that we have MF pipelines properly resolved everywhere, we should be able to implement this, which is how native works. Some games assume a unique media type exposed by the source, and/or video processor being present in the pipeline.
It still decompresses streams internally, so next, we'll have to make it output compressed stream and let MF plug decoder elements in the pipelines.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5627
This is based on work done by Andrew Eikum. It has been in some form in Proton for the last 4 years.
If server's sampling rate is not 48kHz **DOOM Eternal** will try to set it 48kHz for the streams using the implemented interface. There's a whole class of audio devices that use 44.1kHz sampling rate and at least PulseAudio / PipeWire tends to inherit the value from the hardware to avoid resampling. The value can also be overridden by the user via the audio server's config files.
In such cases, if the interface is not present or stubbed, this results in **audio underruns and noticeable crackling**.
It's easy to test with pipewire-pulse:
```
$ cat /etc/pipewire/pipewire.conf.d/sample-rate.conf
context.properties = {
default.clock.rate = 41100
}
```
With PulseAudio this should be doable via setting `default-sample-rate = 41100` in `/etc/pulse/daemon.conf`.
--
v2: winepulse.drv: Implement set_sample_rate.
mmdevapi: Implement AudioClockAdjustment_SetSampleRate.
mmdevapi: Add stub IAudioClockAdjustment implementation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5585
For some reason gitlab is not sending out patches properly (or at least as I would expect) for this MR and testbot isn't triggered. It hasn't sent out [PATCH v4 2/2], and for the no-diff v5 I sent to explicitly retrigger testbot there have been no patches at all :disappointed:
Does gitlab not send out a patch if there hasn't been a content change for that patch since the last version? Is there a way to trigger testbot manually for an MR?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5652#note_70644
Instead of internal ref, otherwise an executing callback might be the
one releasing the last ref, and MFUnlockWorkQueue will cancel and then
block waiting for the callback itself to finish executing.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5631
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v39: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open the desktop shared object in NtUserSetThreadDesktop.
server: Return the desktop object locator in set_thread_desktop.
server: Allocate shared session object for desktops.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
In some Win10 testbot images (notably jp and cn), we can get a spurious
layout change after creating the test window. Detect this and skip the
tests since the test expectations (e.g., wchar mappings) are now
invalid.
--
v3: user32/tests: Remove workaround for SendInput keyboard tests on zh_CN.
user32/tests: Skip affected keyboard tests if a spurious layout change is detected.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5652
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v38: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open the desktop shared object in NtUserSetThreadDesktop.
server: Return the desktop object locator in set_thread_desktop.
server: Allocate shared session object for desktops.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v37: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open desktop shared objects from session mapping.
win32u: Open the global session shared mapping.
server: Return the desktop object info in get_thread_desktop.
server: Allocate shared session object for desktops.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
On Wed May 15 15:19:50 2024 +0000, eric pouech wrote:
> to go one step further native also unmangles without whining something
> like `"?AU?$my_iter@H$0A@$$VJ@@"` into `struct my_iter<int,0,long>`
> (which doesn't make any sense in a C++ way either)
> so it looks like the $$V sequence is just a marker for the end of a
> variadic template, that is unmangled into nothing, and doesn't seem to
> have (at least the ucrtbase version I've used) other visible action
> so the attached patch should be enough
> [err](/uploads/977e89694bc0fcda26a3ba0f1ccb46b7/err)
This marker is specific to templates so it doesn't really belong to `demangle_datatype` function. The patch you have proposed e.g. incorrectly demangles `??__K_l@@YA?AUCC@@I$$VI@Z`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5646#note_70553
The most important thing here is a workaround for an OS bug: rapidly hiding and showing the dock icon can result in multiple icons for the same app, and those icons will ignore NSApp.applicationIconImage. Making sure transitions happen no less than 1 second apart from one another seems to fix it. *Edit:* v2 update: 0.5 seconds is not always long enough. A good test case is the Notepad++ installer: after you select a language, it rapidly hides and shows some windows, and without a longer delay the icon will wind up with the default system terminal-looking icon. One second is probably overkill, but this ought to be a somewhat uncommon case.
Also, hiding a dock icon will deactivate an app. That's not desirable if it still has visible windows, so attempt to force a reactivation. That's often not successful on Sonoma due to the cooperative app activation heuristics, but it's the best we can do, and it should be a rare case.
Also, there is some logic in -transformProcessToForeground: that we often want to happen regardless of whether the app is getting a dock icon (e.g. App Nap and activation). So I've renamed that function to more accurately communicate what it does, and consolidate it with -tryToActivateIgnoringOtherApps:.
--
v3: winemac.drv: Consolidate foregrounding and dock icon behavior.
winemac.drv: Remove incorrect documentation for orderBelow: and rename a parameter.
winemac.drv: Reactivate the app if needed after hiding its dock icon.
winemac.drv: Enforce a delay between dock icon hides and shows.
winemac.drv: Factor menu creation out of transformProcessToForeground:.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5604
On Wed May 15 13:11:30 2024 +0000, Piotr Caban wrote:
> I forgot to mention that native accepts multiple $$V sequences, so e.g.
> `?AU?$my_iter@H$0A@$$V$$V@@` is also parsed (but probably doesn't make
> sense and nothing is mangled this way).
to go one step further native also unmangles without whining something like `"?AU?$my_iter@H$0A@$$VJ@@"` into `struct my_iter<int,0,long>`
(which doesn't make any sense in a C++ way either)
so it looks like the $$V sequence is just a marker for the end of a variadic template, that is unmangled into nothing, and doesn't seem to have (at least the ucrtbase version I've used) other visible action
so the attached patch should be enough
[err](/uploads/977e89694bc0fcda26a3ba0f1ccb46b7/err)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5646#note_70538