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
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 allows this information to be accessible from the IMMDevice's property store when the audio driver provides it (none for now, but I intend to add that feature to `winepulse.drv` and maybe `winealsa.drv`)
This is made specific to containerId rather than supporting VT_CLSID on every property because Wine currently stores VT_BLOBs directly in the registry value, which does not allow us to safely disambiguate between VT_CLSID and VT_BLOB values when reading from registry.
--
v4: mmdevapi: Invalidate ContainerID of unavailable audio devices
mmdevapi: copy ContainerID from audio driver if available
mmdevapi: decode ContainerId property to CLSID in MMDevice_GetPropValue
mmdevapi: support VT_CLSID for containerId property in MMDevice_SetPropValue
https://gitlab.winehq.org/wine/wine/-/merge_requests/359
libOVR brings a message window topmost claiming that this way it receives
WM_DEVICECHANGE faster. Currently, in Wine, this causes a WM_KILLFOCUS to
be sent to the actual topmost window, which in turn causes "Shantae: Risky's
Revenge" to minimize. The effect is that the game automatically minimizes
as soon as it is launched, which is incorrect.
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/419
crypt32: Recognize 'Microsoft Root Certificate Authority 2011' when verifying the Microsoft root policy.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
--
v2: crypt32: Support MICROSOFT_ROOT_CERT_CHAIN_POLICY_CHECK_APPLICATION_ROOT_FLAG.
https://gitlab.winehq.org/wine/wine/-/merge_requests/409
"The King of Fighters '98 Ultimate Match Final Edition" depends on
this behavior. At least, the build I have is; it seems other builds
are not.
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
--
v4: xactengine3_7/tests: Test notifications when loading a wave bank.
fixup! include/wine: Add ANSI color codes.
ntdll: Dump executable.
include/wine: Add ANSI color codes.
ntdll: Introduce x86emu.
ntdll: Allowing injecting an int3.
ntdll: Allow setting a watchpoint.
include/wine: Introduce STAR to dereference a generic number.
widl: Generate empty interface implementations.
ntdll: Log architecture.
ntdll: Implement debug writing to file.
ntdll: Mark Wine code in mmap output.
ntdll: Support dynamically enabling trace messages.
ntdll: Log signals early.
ntdll: Dump a single symbol.
ntdll: Capture stack backtrace from UNIX side.
ntdll: Add facility to disassemble code.
ntdll: Print the command line when a process is started.
ntdll: Dump memory mappings and unmappings.
ntdll: Make dynamic unwind entries accessible from UNIX side.
ntdll: Add +microsecs channel for precise timestamps.
ntdll: Log return address.
ntdll: Log file and line number.
ntdll: Do not suppress useful log fields on \1.
ntdll: Implement log locking and disabling.
ntdll: Add a mechanism to ease development calls.
ntdll: Support gio channel by default.
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/398
"The King of Fighters '98 Ultimate Match Final Edition" depends on
this behavior. At least, the build I have is; it seems other builds
are not.
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
--
v3: xactengine3_7/tests: Test notifications when loading a wave bank.
fixup! include/wine: Add ANSI color codes.
ntdll: Dump executable.
include/wine: Add ANSI color codes.
ntdll: Introduce x86emu.
ntdll: Allowing injecting an int3.
ntdll: Allow setting a watchpoint.
include/wine: Introduce STAR to dereference a generic number.
widl: Generate empty interface implementations.
ntdll: Log architecture.
ntdll: Implement debug writing to file.
ntdll: Mark Wine code in mmap output.
ntdll: Support dynamically enabling trace messages.
ntdll: Log signals early.
ntdll: Dump a single symbol.
ntdll: Capture stack backtrace from UNIX side.
ntdll: Add facility to disassemble code.
ntdll: Print the command line when a process is started.
ntdll: Dump memory mappings and unmappings.
ntdll: Make dynamic unwind entries accessible from UNIX side.
ntdll: Add +microsecs channel for precise timestamps.
ntdll: Log return address.
ntdll: Log file and line number.
ntdll: Do not suppress useful log fields on \1.
ntdll: Implement log locking and disabling.
ntdll: Add a mechanism to ease development calls.
ntdll: Support gio channel by default.
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/398
--
v2: win32u: Read and cache adapter modes from the registry.
win32u: Introduce new add_mode device manager callback.
winemac.drv: Introduce new display_mode_to_devmode helper.
winex11.drv: Set desktop settings handler before updating display devices.
https://gitlab.winehq.org/wine/wine/-/merge_requests/406
the test would hang on wine before the implementation is in place. the CloseHandle before the WaitForSingleObject is a workaround to get the thread to exit
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_3840
On Sun Jul 10 17:41:41 2022 +0000, Jinoh Kang wrote:
> I'd at least leave a "partial fixme" here, since this is, after all, a
> partial implementation.
will do
still isn't clear to me what the 2nd argument does. 32-bit windows treats it differently from 64-bit windows, but only in the returned ntstatus. doesn't seem to affect the intended behavior
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/47#note_3838
Thanks for all the detailed comments. But I suppose before going into these details and improving the neats it would be great to hear from Zebediah or Alexandre if this MR is a go in principle. As it is not apparent to me from the initial Zeb's comment.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/384#note_3817
Jinoh Kang (@iamahuman) commented about server/protocol.def:
> - int force_async; /* Force asynchronous mode? */
> + async_data_t async; /* async I/O parameters */
> + int force_async; /* Force asynchronous mode? */
> @REPLY
> obj_handle_t wait; /* handle to wait on for blocking send */
> unsigned int options; /* device open options */
> int nonblocking; /* is socket non-blocking? */
> + int fixup_type; /* socket protocol fixup */
> +@END
> +
> +
> +/* Store info needed for protocol fixup */
> +@REQ(socket_fixup_send_data)
> + obj_handle_t handle; /* socket handle */
> + unsigned short icmp_id; /* ICMP packet id */
> + unsigned short icmp_seq; /* ICMP packed sequence */
Instead of re-aligning tabbing of `@REQ(send_socket)`, maybe we can also use `int` or `short` here. Although `unsigned short` makes more sense if we're going to restrict the scope of the two new server calls only to ICMP packets.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/384#note_3814
Jinoh Kang (@iamahuman) commented about server/sock.c:
> struct fd *fd;
>
> if (!sock) return;
> +
> + if (sock->fixup_type != req->fixup_type)
> + {
> + /* Protocol fixup information should be reflected in client's async data before the
> + * async is delivered to process. So let the client set up the info and restart the
> + * call. */
> + reply->fixup_type = sock->fixup_type;
> + set_error( STATUS_MORE_PROCESSING_REQUIRED );
> + release_object( sock );
> + return;
> + }
> +
We can save the `fixup_type` round trip in the optimal case by returning `STATUS_MORE_PROCESSING_REQUIRED` _only_ when the async would otherwise enter the pending state (i.e. final `status` is `STATUS_PENDING`), and setting `reply->fixup_type` in all cases (specifically, `status == STATUS_ALERTED`).
Not sure if this improvement would be worth it, though, especially since
1) it doesn't eliminate `STATUS_MORE_PROCESSING_REQUIRED` (the raison d'��tre of which being that can't pass extra info via `APC_ASYNC_IO`, and we can't normally synchronize with the APC either, since it's asynchronous by nature) completely, and thus doesn't help simplify the patch,
2) not many tools rely on ICMP packet performace (save for a few network testing tools), and
3) server calls make us lose in the first place.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/384#note_3812
Jinoh Kang (@iamahuman) commented about dlls/ws2_32/socket.c:
> }
>
>
> -static BOOL protocol_matches_filter( const int *filter, int protocol )
> +static BOOL protocol_matches_filter( const int *filter, unsigned int index )
Would it be more clear to accept `const WSAPROTOCOL_INFOW *` instead of an index into the `supported_protocols` array?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/384#note_3811
Jinoh Kang (@iamahuman) commented about dlls/ws2_32/tests/sock.c:
> + sum += s;
> + carry = s > sum;
> + count -= 2;
> + }
> + sum += carry; /* This won't produce another carry */
> + sum = (sum & 0xffff) + (sum >> 16);
> +
> + if (count) sum += *data; /* LE-only */
> +
> + sum = (sum & 0xffff) + (sum >> 16);
> + /* fold in any carry */
> + sum = (sum & 0xffff) + (sum >> 16);
> +
> + check = ~sum;
> + return check;
> +}
It's much simpler to implement 1's complement checksum without the use of an explicit `carry` variable. How about the following:
```suggestion:-25+0
static UINT16 chksum(BYTE *data, unsigned int count)
{
UINT16 *ptr = (UINT16 *)data, *end = ptr + count / 2;
unsigned int sum = 0;
while (ptr != end)
{
sum += *ptr++;
sum = (sum & 0xffff) + (sum >> 16);
}
if (count % 2)
{
sum += *(BYTE *)ptr; /* LE-only */
sum = (sum & 0xffff) + (sum >> 16);
}
return ~sum;
}
```
Note that `sum` is in range `[0, 0xfffe]` at the start of each iteration. After addition, the range extends to `[0, 0x1fffd]`; however, since `0xfffd + 0x1 = 0xfffe`, the range folds back to `[0, 0xfffe]`.
Ditto for tests in ntdll.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/384#note_3810
--
v2: winegstreamer: Check H264 ProcessOutput sample against actual image size.
winegstreamer: Use H264 input media type frame size when specified.
winegstreamer: Implement H264 SetOutputType by reconfiguring the pipeline.
https://gitlab.winehq.org/wine/wine/-/merge_requests/405
On Fri Jul 8 04:21:30 2022 +0000, Ziqing Hui wrote:
> I didn't checkout the SDK header files though.
If it's not in SDK, we shouldn't have it in public headers either. There is an equivalent E_NOT_SET macro that you can use, and if D2DERR one appears in SDK at some point we'll switch to it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/388#note_3597
Nikolay Sivov (@nsivov) commented about dlls/d2d1/d2d1_private.h:
> void d2d_factory_register_effect(struct d2d_factory *factory,
> struct d2d_effect_registration *effect) DECLSPEC_HIDDEN;
>
> +struct d2d_offset_transform
> +{
> + ID2D1OffsetTransform ID2D1OffsetTransform_iface;
> + LONG refcount;
> + D2D1_POINT_2L offset;
> +};
> +
Do we need a separate structure for each type of node? Maybe we could have a structure similar to d2d_brush. My understanding is it's not possible to have user-defined node types.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/388#note_3596
Based on <https://source.winehq.org/patches/data/238821> by Zhao Yi.
--
v4: ntdll: Correctly handle shift greater than the type width in 64-bit shift functions.
ntdll: Avoid depending on compiler support for 64-bit shift functions.
ntdll/tests: Add tests for runtime 64-bit shift functions.
ntdll: Fix the calling convention for runtime 64-bit shift functions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/375
--
v7: winegstreamer: Use an atomic queue for wg_transform input buffers.
winegstreamer: Release requested samples if they are too small.
mf/tests: Add todo_wine for newer FFmpeg versions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/302
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52128
Signed-off-by: Robert Wilhelm <robert.wilhelm(a)gmx.net>
--
v4: scrrun: Support wildcards in MoveFolder().
scrrun: Move source dir into destination dir if destination ends with separator in MoveFolder().
scrrun: Check that source is directory in MoveFolder.
scrrun: Check for non-existant source in MoveFolder.
scrrun: Test MoveFolder with already existing destination.
scrrun: Check for null and empty arguments in MoveFolder.
scrrun: Implement MoveFolder().
https://gitlab.winehq.org/wine/wine/-/merge_requests/391
This re-uses existing functions from Win32_ComputerSystemProduct to provide
more accurate values, which are helpful to system overview applications.
How to test:
`wmic.exe computersystem GET Manufacturer`
Previously discussed with davidebeatrici, 2022-07-02 in #winehackers.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/401
"The King of Fighters '98 Ultimate Match Final Edition" depends on
this behavior. At least, the build I have is; it seems other builds
are not.
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
--
v2: xactengine3_7/tests: Test notifications when loading a wave bank.
https://gitlab.winehq.org/wine/wine/-/merge_requests/398
"The King of Fighters '98 Ultimate Match Final Edition" depends on
this behavior. At least, the build I have is; it seems other builds
are not.
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/398
Based on <https://source.winehq.org/patches/data/238821> by Zhao Yi.
--
v3: ntdll: Correctly handle shift greater than the type width in 64-bit shift functions.
ntdll: Avoid depending on compiler support for 64-bit shift functions.
ntdll/tests: Add tests for runtime 64-bit shift functions.
ntdll: Fix the calling convention for runtime 64-bit shift functions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/375
On Thu Jul 7 06:09:46 2022 +0000, Chip Davis wrote:
> What about `'/'`? I know that's a valid separator to the Win32 API. Is
> it one to this API?
Thanks. '/' is indeed a valid separator. I will create new MR.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/391#note_3523
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.
--
v2: 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
Nikolay Sivov (@nsivov) commented about include/d2derr.h:
> #ifndef __WINE_D2DERR_H
> #define __WINE_D2DERR_H
>
> +#define D2DERR_NOT_FOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
I don't see in 10.0.2200.0 SDK. Where does it come from?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/388#note_3514