To prevent performance degradation, we will cache the result of GetConsoleOutputCP() after executing every external command.
--
v3: cmd: Use the console output code page to read batch files.
programs/cmd: Factor out code_page when searching for a label.
cmd/tests: Add updated code page test in batch file.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6885
To prevent performance degradation, we will cache the result of GetConsoleOutputCP() after executing every external command.
--
v2: cmd: Use the console output codepage to read batch files.
cmd/tests: Add updated code page test in batch file.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6885
On Sat Apr 19 16:23:57 2025 +0000, eric pouech wrote:
> forgot to say that executable files must be in considered directory
> (eg if a.exe and e.bat exist in current directory, then 'a\<tab\>' shall
> circle around both files); PATH is not used
My code already does this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101459
On Sat Apr 19 16:20:43 2025 +0000, eric pouech wrote:
> maybe. i could also be something that cmd implements in
> CONSOLE_READCONSOLE_CONTROL (using 0x1B in control mask).
That's how I'm handling it in current changes (not yet pushed). But I shouldn't need to, based on ReadConsole behaviour that I see on Windows.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101458
On Sat Apr 19 16:23:57 2025 +0000, Joe Souza wrote:
> Testing on Windows 11 this morning, I find that Windows does not filter
> on .EXE or anything in PATHEXT if tab key is hit for first word on
> command line.
forgot to say that executable files must be in considered directory
(eg if a.exe and e.bat exist in current directory, then 'a\<tab\>' shall circle around both files); PATH is not used
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101456
On Sat Apr 19 15:01:13 2025 +0000, Joe Souza wrote:
> A bug in Wine's ReadConsole implementation that I found while making
> these changes is that Wine does not handle ESC key correctly. On
> Windows, ESC key clears the text on the screen and clears the buffer.
> Wine emits the control character for the ESC key. I'll handle this in
> my changes and add a FIXME comment.
maybe. i could also be something that cmd implements in CONSOLE_READCONSOLE_CONTROL (using 0x1B in control mask).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101455
On Fri Apr 18 16:37:52 2025 +0000, Joe Souza wrote:
> OK, using ReadConsole/CONSOLE_READCONSOLE_CONTROL on Windows gives me
> the behaviour that I need; i.e. pre-filled text is preserved and can be
> further edited. Caller must output the text first, but seems to work as expected.
> I'll start making the changes to my code soon, within the coming days.
A bug in Wine's ReadConsole implementation that I found while making these changes is that Wine does not handle ESC key correctly. On Windows, ESC key clears the text on the screen and clears the buffer. Wine emits the control character for the ESC key. I'll handle this in my changes and add a FIXME comment.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101451
On Sat Apr 19 14:56:08 2025 +0000, Joe Souza wrote:
> Will definitely handle .exe filtering as a subsequent patch.
Testing on Windows 11 this morning, I find that Windows does not filter on .EXE or anything in PATHEXT if tab key is hit for first word on command line.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101450
This fixes a test failure/crash on Windows 8.1 introduced by dd1d82728811c15716eefa0917eb3ecac4b9a85a.
--
v3: mfplat/tests: Don't assume video processor MFT can provide samples.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7838
I think what's missing is an audio client Reset(). We currently do Stop+Reset when the clock is stopped, and just Stop when the clock is paused. We don't Reset on pause so we don't lose pending data. But when we restart from at a different timestamp I think we should.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7833#note_101438
On Thu Apr 17 21:23:59 2025 +0000, Brendan McGrath wrote:
> I couldn't get this to build unfortunately. But if you can seek in this
> program, then you should be able to recreate the issue with pause, seek
> and then play.
You can seek with it, but it's not implemented on our side yet.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7833#note_101437
Adapted from [check_invalid_gs](https://gitlab.winehq.org/wine/wine/-/blob/d7a7cae2e2d1ad… in signal_i386.c. This prevents crashing when the %gs register is manipulated, such as in 32-bit code on "new-style" WoW64.
"Exertus: Darkness Approaches" is a 32-bit game that triggers this crash (on WoW64), which can be downloaded from the Bugzilla page's attachments. For another example, [test.c](https://bugs.winehq.org/attachment.cgi?id=77444) can reproduce it, courtesy of Fabian Maurer from the Bugzilla comments. This will crash whether it's compiled as 32-bit or 64-bit, while it works fine on Windows.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57444
Also, excuse me if submitting this is against some sort of code-freeze etiquette, it wasn't my intention try to have it merged immediately.
--
v8: ntdll/tests: Re-enable a previously crashing test.
ntdll: Check for invalid gs_base in the 64-bit segv_handler.
ntdll/tests: Add an exception test for accessing a modified %gs on x86_64.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7064
On Fri Apr 18 17:25:10 2025 +0000, eric pouech wrote:
> also note that for the first word of command line, when using tab,
> native cmd.exe filters on directories and files that can be executed
> (likely using PATHEXT list of extensions, didn't test that though)
> i'd suggest handling in two seperate patches the rd/md part, and the
> first parameter one...
> that should boil down to adding filters to the files gotten out of find
> files (directories and/or extensions) depending on context
Will definitely handle .exe, etc. filtering as a subsequent patch.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101422
--
v6: amstream: Implement dynamic formats in ddraw stream.
amstream/tests: Test for dynamic formats in ddraw stream.
amstream: Implement custom allocator for ddraw stream.
amstream/tests: Test for custom allocator in ddraw stream.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7715