nvda
b236fe60 - Fix legacy Windows console support (#18990)

Commit
127 days ago
Fix legacy Windows console support (#18990) ### Link to issue number: <!-- Use Closes/Fixes/Resolves #xxx to link this PR to the issue it is responding to. --> Fixes #18970 ### Summary of the issue: With the move to 64 bit, some Legacy Windows console support is incompatible with the well-defined ctypes definitions. E.g. GetConsoleProcessList and ReadConsoleOutputCharacter, causing ctypes argument errors and Legacy Windows console support to not function at all. ### Description of user facing changes: Legacy Windows console support functions again. ### Description of developer facing changes: ### Description of development approach: * `wincon.getConsoleProcessList`: correctly pass a DWORD array as the process list, rather than an int array. * `wincon.readConsoleOutputCharacter`: Correctly pass a Unicode buffer (wchar array) rather than char array. However, then encode the buffer's contents to utf-16 bytes when passing to `textUtils.getTextFromRawBytes`. ### Testing strategy: * In Windows terminal settings, choose to use Windows console host. * In NvDA advanced settings, choose to use Legaticy Windows console support. * Open a cmd prompt. Confirm that errors are no longer thrown, and that NvDA can read text with the review cursor, fetch the formatting with NvDA+f, and that new text written to the console is spoken. ### Known issues with pull request: None known. ### Code Review Checklist: <!-- This checklist is a reminder of things commonly forgotten in a new PR. Authors, please do a self-review of this pull-request. Check items to confirm you have thought about the relevance of the item. Where items are missing (eg unit / system tests), please explain in the PR. To check an item `- [ ]` becomes `- [x]`, note spacing. You can also check the checkboxes after the PR is created. A detailed explanation of this checklist is available here: https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/githubPullRequestTemplateExplanationAndExamples.md#code-review-checklist --> - [x] Documentation: - Change log entry - User Documentation - Developer / Technical Documentation - Context sensitive help for GUI changes - [x] Testing: - Unit tests - System (end to end) tests - Manual testing - [x] UX of all users considered: - Speech - Braille - Low Vision - Different web browsers - Localization in other languages / culture than English - [x] API is compatible with existing add-ons. - [x] Security precautions taken. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Parents
Loading