On Mon Jul 11 15:14:45 2022 +0000, Jinoh Kang wrote:
> Per Wine code style, you should omit the second space in `&io ) )`.
> ```suggestion:-0+0
> return set_ntstatus( NtCancelSynchronousIoFile( thread, NULL, &io ));
> ```
the file has a mix of styles. it does look from a skim like most are without the space, but i think i copied from CancelIo and CancelIoEx right above it, and they both have the space. never quite sure what to do in those cases, but i can remove it
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/47#note_3917
> Wait, what's partial about it?
i don't handle the 2nd argument, but it doesn't seem to be used for what i need, though. i can implement the higher level kernel32 call without it
what about something like this, copied from NtUnlockFile:
`
TRACE( "(%p %p %p)\n", handle, io, io_status );
if (io) FIXME("Unimplemented yet parameter\n");
`
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/47#note_3914
Assassin's Creed Origins clobbers rbx in its main module (second of three) TLS callbacks. That is apparent right in the beginning of the TLS callback disassembly when rbx is set to '4' unconditionally without any prior save. That leads to a fault in call_tls_callbacks() which is still in __TRY block and gets handled. However the third TLS callback is not executed and that leads to intermittent hangs later on.
It is rather involved to make a TLS callback test in Wine testsuite as there is no portable way to generate a custom TLS callback. I've made a test program (based on the example here: https://lallouslab.net/2017/05/30/using-cc-tls-callbacks-in-visual-studio-w…) and compiled it with MSVC. The source code is here: https://gist.github.com/gofman/3287a953bcab3a5c888a8d494461cb8a. The program calls all the callbacks on Windows 10 here.
There is also a similar wrapper already there for i386 on another occasion.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/427
The commit end of a subheap may be equal to the beginning of another subheap, in
which case find_subheap() will return that one, and we may effectively skip
backwards in the subheap list.
---
There may be a more architecturally palatable way to solve this problem, but
hopefully this is enough to at least demonstrate it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/425
> the test would hang on wine before the implementation is in place.
Thanks! I missed that the current test cannot verify the Windows behaviour before the commit that introduces the Wine implementation.
> the CloseHandle before the WaitForSingleObject is a workaround to get the thread to exit
I'm afraid that closing a handle in use is racy by nature; it's effectively pulling the rug out from underneath. A better approach would be to use `CancelIoEx` on the `OVERLAPPED` structure, or `NtCancelIoFileEx` on the `IO_STATUS_BLOCK` structure to cancel the pending operation.
>
> moving the CloseHandle was meant to show that workaround is no longer needed and that it now performs like windows
>
> i can remove that if preferred
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/47#note_3873
Some games with support for the haptic feedback and speaker features of the Sony DualSense controller select the controller's audio output by filtering on the ContainerId IMMDevice property to find one that matches the controller's HID's. This MR, together with !359, adds support for exposing such a ContainerId to applications.
I marked this MR as a draft because I understand that the way the ���guid��� is generated is far from ideal. Furthermore, I will need to map from sysfs to container Id in other components as well (`winebus` for the HID device, and possibly `winealsa` and other audio drivers), so moving that part elsewhere would make sense. However, I think I will need help with those tasks.
--
v3: winepulse: Add support for containerId property from sysfs path
winepulse: Store PulseAudio device's sysfs path when available
https://gitlab.winehq.org/wine/wine/-/merge_requests/360