Prompts: keyboard keys with MOUSE AND KEYBOARD on, and no gamepad pictures from a load during the redraw #3442

Closed
github-bot wants to merge 2 commits from github-bot/gh-3442 into main AGit
Owner

@⁠JohnNajar on GitHub · 2026-11-29 23:24 UTC · original
JohnNajar:fix/keyboard-prompts → main · +110 −4 · 3 files · 2 commits · closed without merging

Two fixes for keyboard prompts in v2026.11.29.02. With them, a double-clicked victory.exe with CONTROLS = KEYBOARD shows keyboard keys again.

1. Keys with MOUSE AND KEYBOARD on (b0758083)

With MOUSE AND KEYBOARD on (VICTORY_MNK=1), play always names a bindings file in VICTORY_MNK_BINDINGS, writing bindings.ini with the stock keys the first time. But show_keys_in_prompts keeps the gamepad pictures whenever VICTORY_MNK_BINDINGS is set. So with CONTROLS = KEYBOARD and the default MOUSE AND KEYBOARD, the prompts were always Xbox buttons; the console says prompts gamepad pictures: keyboard prompts use the stock Victory bindings.

Now a bindings file whose keys are the stock ones, the mouse sensitivity aside, keeps the keyboard prompts. One with a key moved still gets the gamepad pictures, since the redrawn icons show the stock keys. Test: run::prompt_choice_tests::stock_keys_whatever_the_sensitivity.

2. No more Xbox pictures at start now and then (ab2027a4)

The store hands the icon movie over on one thread (keep: the key caps are drawn, about 0.1 s), while a movie can load it by name on another (serve). A load that came while the copy was still being drawn got the original, which meant gamepad pictures for the whole run, now and then at start. On an RTX 3090 one start showed Xbox buttons with none of the prompts: lines in its log, while starts with the same settings logged key caps drawn and the title loads the icon movie with key caps. serve now waits for a redraw under way of the same movie (tag, address), at most 2 s, then answers with the copy. Test: prompts::hook::tests::a_load_waits_for_the_redraw_under_way: no wait with nothing drawn, waits until the redraw ends, and not past its limit.

Checked

  • cargo test -p victory-game -- prompts: 37 passed. cargo test -p victory -- prompt_choice_tests: 2 passed.
  • In game (RTX 3090, CONTROLS = KEYBOARD, MOUSE AND KEYBOARD on, a bindings.ini with the stock keys and sensitivity 0.060): the console said prompts keyboard keys: hook placed, the log key caps drawn into the icon movie and the title loads the icon movie with key caps, and the game showed keyboard keys. That was fix 1. Fix 2 was checked by its test only: the race came now and then.
**@⁠JohnNajar** on GitHub · 2026-11-29 23:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3442) `JohnNajar:fix/keyboard-prompts` → `main` · +110 −4 · 3 files · 2 commits · closed without merging Two fixes for keyboard prompts in v2026.11.29.02. With them, a double-clicked `victory.exe` with **CONTROLS = KEYBOARD** shows keyboard keys again. ### 1. Keys with MOUSE AND KEYBOARD on (b0758083) With MOUSE AND KEYBOARD on (`VICTORY_MNK=1`), `play` always names a bindings file in `VICTORY_MNK_BINDINGS`, writing `bindings.ini` with the stock keys the first time. But `show_keys_in_prompts` keeps the gamepad pictures whenever `VICTORY_MNK_BINDINGS` is set. So with CONTROLS = KEYBOARD and the default MOUSE AND KEYBOARD, the prompts were always Xbox buttons; the console says `prompts gamepad pictures: keyboard prompts use the stock Victory bindings`. Now a bindings file whose **keys** are the stock ones, the mouse sensitivity aside, keeps the keyboard prompts. One with a key moved still gets the gamepad pictures, since the redrawn icons show the stock keys. Test: `run::prompt_choice_tests::stock_keys_whatever_the_sensitivity`. ### 2. No more Xbox pictures at start now and then (ab2027a4) The store hands the icon movie over on one thread (`keep`: the key caps are drawn, about 0.1 s), while a movie can load it by name on another (`serve`). A load that came while the copy was still being drawn got the original, which meant gamepad pictures for the whole run, now and then at start. On an RTX 3090 one start showed Xbox buttons with none of the `prompts:` lines in its log, while starts with the same settings logged `key caps drawn` and `the title loads the icon movie with key caps`. `serve` now waits for a redraw under way of the same movie (tag, address), at most 2 s, then answers with the copy. Test: `prompts::hook::tests::a_load_waits_for_the_redraw_under_way`: no wait with nothing drawn, waits until the redraw ends, and not past its limit. ### Checked - `cargo test -p victory-game -- prompts`: 37 passed. `cargo test -p victory -- prompt_choice_tests`: 2 passed. - In game (RTX 3090, CONTROLS = KEYBOARD, MOUSE AND KEYBOARD on, a `bindings.ini` with the stock keys and sensitivity 0.060): the console said `prompts keyboard keys: hook placed`, the log `key caps drawn into the icon movie` and `the title loads the icon movie with key caps`, and the game showed keyboard keys. That was fix 1. Fix 2 was checked by its test only: the race came now and then.
`play` always names a bindings file with MOUSE AND KEYBOARD on (VICTORY_MNK=1), writing it with the
stock keys the first time, and show_keys_in_prompts kept the gamepad pictures whenever
VICTORY_MNK_BINDINGS was set. So a double-clicked victory.exe with CONTROLS = KEYBOARD never showed
keys. A bindings file whose keys are the stock ones (its sensitivity aside) now keeps the keyboard
prompts; one with a key moved still gets the gamepad pictures, since the prompts show the stock keys.
stock_keys_whatever_the_sensitivity covers both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The store hands the icon movie over on one thread (keep: the key caps are drawn, about 0.1 s) while
a movie can load it by name on another (serve). A load that came while the copy was still drawn got
the original: gamepad pictures for the whole run, now and then at start. serve now waits for a
redraw under way of the same movie (tag, address), at most 2 s, then answers with the copy.
a_load_waits_for_the_redraw_under_way: no wait with nothing drawn, waits until the redraw ends, and
not past its limit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 23:27:16 +00:00
Author
Owner

@⁠JohnNajar on GitHub · 2026-11-30 01:10 UTC · original

In game with both fixes (RTX 3090, CONTROLS = KEYBOARD, MOUSE AND KEYBOARD on, bindings.ini with the stock keys): the title screen shows keyboard key caps, ACCOUNT PICKER [Y] and P
LAYER [Enter], where v2026.11.29.02 showed the Xbox buttons.

keyboard-prompts-title
**@⁠JohnNajar** on GitHub · 2026-11-30 01:10 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3442#issuecomment-7265912955) In game with both fixes (RTX 3090, CONTROLS = KEYBOARD, MOUSE AND KEYBOARD on, bindings.ini with the stock keys): the title screen shows keyboard key caps, ACCOUNT PICKER [Y] and P LAYER [Enter], where v2026.11.29.02 showed the Xbox buttons. <img width="800" height="160" alt="keyboard-prompts-title" src="https://github.com/user-attachments/assets/165bc21d-d5d8-445a-96ef-e56c32848774" />
github-bot closed this pull request 2026-12-01 18:58:38 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!3442
No description provided.