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

Closed
JohnNajar wants to merge 2 commits from upstream-pr/3442 into main
JohnNajar commented 2026-11-29 23:24:22 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by JohnNajar on 2026-11-29T23:24:22Z.


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.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5556279734 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3442). Originally posted by [JohnNajar](https://github.com/JohnNajar) on 2026-11-29T23:24:22Z. --- 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 commented 2026-11-30 01:10:53 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by JohnNajar on 2026-11-30T01:10:53Z.


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
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7265912955 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3442#issuecomment-7265912955). Originally posted by [JohnNajar](https://github.com/JohnNajar) on 2026-11-30T01:10:53Z. --- 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" />
trustno1-coder commented 2026-12-01 18:52:12 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:52:12Z.


Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321709940 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3442#issuecomment-7321709940). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:52:12Z. --- Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

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