Prompts: keyboard keys with MOUSE AND KEYBOARD on, and no gamepad pictures from a load during the redraw #3442
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3442"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.exewith CONTROLS = KEYBOARD shows keyboard keys again.1. Keys with MOUSE AND KEYBOARD on (
b0758083)With MOUSE AND KEYBOARD on (
VICTORY_MNK=1),playalways names a bindings file inVICTORY_MNK_BINDINGS, writingbindings.iniwith the stock keys the first time. Butshow_keys_in_promptskeeps the gamepad pictures wheneverVICTORY_MNK_BINDINGSis set. So with CONTROLS = KEYBOARD and the default MOUSE AND KEYBOARD, the prompts were always Xbox buttons; the console saysprompts 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 theprompts:lines in its log, while starts with the same settings loggedkey caps drawnandthe title loads the icon movie with key caps.servenow 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.bindings.iniwith the stock keys and sensitivity 0.060): the console saidprompts keyboard keys: hook placed, the logkey caps drawn into the icon movieandthe 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.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.
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.
Pull request closed