Game: draw keyboard key caps over the title's button prompts #3433
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3433"
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 Marvisak/VIctory. Originally posted by imjustprism on 2026-11-27T01:39:15Z.
with
--prompts keysthe title's button prompts show the keys of the keyboard's stand-in pad (enter, backspace, esc, wasd and so on) instead of xbox buttons. the icon movie is redrawn in memory when the streaming store hands it over: each known icon becomes a white key cap with its label, outlined at run time from segoe ui bold and segoe ui symbol on the host. nothing of the game is stored. the movie is recognised by its structure, and the hook sits on one pointer whose per-build offset is in victory-game. the default stays--prompts gamepad, which places no hook.the stand-in pad's bindings move to victory-core so victory-game can name them without depending on victory-hle, and the loader gets checked helpers to read and write one pointer slot and to resolve a code address.
tested on an rx 9070 xt with a diag build, together with #2427 for a faster start: the first screen shows the y and enter keys, and a playthrough of the menus logged one redraw, the title using it, and no errors. unit tests cover the movie reader, the shape writer, the outline parser and the hook with stand-in title functions. animated hold prompts keep their pad pictures, and the prompts don't switch back when a pad is plugged in.
#3399 takes another route, for playstation glyphs from the user's files; this one draws its own pictures and needs no files.
refs #187
Imported from Marvisak/VIctory. Originally posted by imjustprism on 2026-11-27T01:40:09Z.
all 38 key caps as the redraw makes them, drawn from the hand-built test movie in the fixtures (no game pixels), with the pad control each one stands for:
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-27T02:00:28Z.
Review: APPROVED
Looks good to me — thorough, clean-room implementation with well-bounded parsing, safe pointer-hook validation, and solid test coverage across the affected crates.
Review & Verification Notes
cargo xtask policypasses (asset policy: 196 files ok), no new external dependencies are added, and key-cap glyphs are outlined at runtime from host Windows fonts (Segoe UI/Segoe UI Symbol) viaGetGlyphOutlineWwith no bundled retail or font assets.victory-core/src/pad.rs,victory-formats/src/gfx.rs, andvictory-game/src/prompts.rsare pure safe Rust, with checked arithmetic and explicit bit-width bounds (WIDEST_FIELD_BITS=31,WIDEST_EDGE_BITS=17) throughout GFx/SWF parsing and rewriting.victory-loader/src/windows.rsvalidates 8-byte alignment, image bounds, and data vs. executable section flags (SCN_MEM_EXECUTE) onread_pointer/write_pointer/code_address;prompts/hook.rsverifies the dereferenced original function pointer points into an executable image section before installing and stays completely inactive unless--prompts keys --executeis explicitly requested for a matching known build.4f7fdb5d:cargo clippy -p victory-core -p victory-formats -p victory-game -p victory-hle -p victory-loader -p victory --lib --bins --tests -- -D warningsandcargo clippy -p victory-hle -p victory --features diagnostics --tests -- -D warningsare both clean.victory-core(14/14),victory-formats(64/64, 5 ignored benchmarks/external),victory-game(50/50, including live Windows GDI font outline tests andprompts::hook::tests),victory-loader(35unit +crash_log+load_probepointer-swap integration tests +title_dlls), andvictory-hlemodules::gameinput(11/11).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.