eric pouech (@epo) commented about programs/conhost/conhost.c:
> while (ctx->history_index != start_pos);
> }
>
> +static void edit_line_copy_from_hist( struct console *console, int copycount )
> +{
> + if (console->edit_line.history_index)
> + {
> + unsigned int index = console->edit_line.history_index - 1;
> + struct edit_line *ctx = &console->edit_line;
> + WCHAR *line = edit_line_history(console, index);
> + unsigned int len = line ? lstrlenW(line) : 0;
> +
> + if (len > ctx->cursor)
it looks like native is doing stuff a bit more complicated:
* the MR implements the case where cursor is at the end of edit line
* if cursor is not at the end, it looks native just advance cursor by ccount
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8467#note_108891
eric pouech (@epo) commented about programs/conhost/conhost.c:
> while (ctx->history_index != start_pos);
> }
>
> +static void edit_line_copy_from_hist( struct console *console, int copycount )
> +{
> + if (console->edit_line.history_index)
> + {
> + unsigned int index = console->edit_line.history_index - 1;
> + struct edit_line *ctx = &console->edit_line;
> + WCHAR *line = edit_line_history(console, index);
since you're not changing the `console->history` content, you could access `console->history[index]` directly (that would save recomputing the length, and one allocation)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8467#note_108890
eric pouech (@epo) commented about programs/conhost/conhost.c:
> while (ctx->history_index != start_pos);
> }
>
> +static void edit_line_copy_from_hist( struct console *console, int copycount )
> +{
> + if (console->edit_line.history_index)
> + {
> + unsigned int index = console->edit_line.history_index - 1;
why -1?
you could probably swap this line with next to use `ctx`
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8467#note_108889
eric pouech (@epo) commented about programs/conhost/conhost.c:
> while (ctx->history_index != start_pos);
> }
>
> +static void edit_line_copy_from_hist( struct console *console, int copycount )
for consistency with other entries, please use `_history` instead of `_hist`
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8467#note_108888
This MR improves widl with :
- fixes a segfault when inheriting from an incomplete interface
(prints an error message instead),
- supports (for C++) inheriting from interfaces which are declared
after the declaration of the derived interface.
--
v3: include: Remove duplicated declarations in .idl files.
tools/widl: Ensure inherited interface is declared before using it.
tools/widl: Remove unneeded condition.
tools/widl: Fix segfault when inheriting from an incomplete interface.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8500
If wine dlls are built with frame pointers enabled, the frame pointer will be
used during unwinding.
If we don't restore frame pointer before calling the user mode callback, then
later when the unwinder encounters the user mode callback frame, it will set
the frame pointer to something unexpected (depends on what it was during
`call_user_mode_callback`). Then for the subsequent frame it adjusts the stack
pointer based on the frame pointer, thus derailing the unwinding process.
--
v4: ntdll: Also restore rbp before calling user mode callback.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8466
If wine dlls are built with frame pointers enabled, the frame pointer will be
used during unwinding.
If we don't restore frame pointer before calling the user mode callback, then
later when the unwinder encounters the user mode callback frame, it will set
the frame pointer to something unexpected (depends on what it was during
`call_user_mode_callback`). Then for the subsequent frame it adjusts the stack
pointer based on the frame pointer, thus derailing the unwinding process.
--
v3: ntdll: Also restore rbp before calling user mode callback.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8466
Follow-up to !8184.
This also adds a bunch of helpers for writing media source tests (without involving the mf session) in mfsrcsnk, these could be helpful for more tests of this kind in the future. I'm somewhat unsure as to why we haven't done tests for source behavior so far: while those are plugins, applications rely on a bunch of things in the builtin sources that microsoft provides.
Since this affects both mfsrcsnk and winegstreamer sources, tests should be run both with `HKCU\\Software\\Wine\\MediaFoundation\\DisableGstByteStreamHandler` enabled and disabled. Due to this I figured it'd make sense to implement everything first and then remove the test todo_wine's and the statements rejecting the thin parameter in a single commit ("Allow thinning"). Perhaps this could be solved more nicely by setting the registry key in the tests themselves? I'm unsure if that is something we do in tests, generally.
`MEStreamThinMode` events need to be emitted between the last sample using the outdated thinning parameter and the first sample using the updated thinning parameter. The winegstreamer implementation for this turned out a bit complex, if there is a simpler way to do this please let me know.
Regarding winegstreamer, note that buffers need to be intercepted before the decoder because decoders often discard `GST_BUFFER_FLAG_DELTA_UNIT` flags (which is already annoying in itself - it causes all samples to be marked as `MFSampleExtension_CleanPoint`, this should potentially be worked around in the future). But even besides that, intercepting before the decoder is the "proper" implementation, since the point of thinning is increasing decoding speed by skipping delta frames, tho there are some games that rely on the semantics as well.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8505