fix: shader cache key and keyboard prompt glyphs #3708

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

@⁠victorportelada on GitHub · 2026-11-30 04:25 UTC · original
victorportelada:pr/small-fixes → main · +4 −12 · 2 files · 2 commits · closed without merging

Two small fixes

1. Shader cache key: drop switches removed upstream

The cache-key test still compared two translator switches that no longer exist in the shader emitter. Keeping them in the key test could invalidate the cache for no reason. This removes them from the key check; cargo test -p victory-gpu --lib shader_cache passes (11 tests).

2. Keyboard prompt glyphs with the stock MNK bindings

run.rs only installed the keyboard key-cap hook when a custom VICTORY_MNK_BINDINGS file was set, so the default bindings.ini path showed controller glyphs even with mouse and keyboard on. The hook now installs when keyboard prompts are requested regardless of whether bindings came from the default file or a custom one. On the test rig the log now reads prompts keyboard keys: hook placed and the title loads the icon movie with key caps. cargo test -p victory-game --lib prompts passes (36 tests).

Both changes are small, independent and text-only. No game data is included.

**@⁠victorportelada** on GitHub · 2026-11-30 04:25 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3708) `victorportelada:pr/small-fixes` → `main` · +4 −12 · 2 files · 2 commits · closed without merging ## Two small fixes ### 1. Shader cache key: drop switches removed upstream The cache-key test still compared two translator switches that no longer exist in the shader emitter. Keeping them in the key test could invalidate the cache for no reason. This removes them from the key check; `cargo test -p victory-gpu --lib shader_cache` passes (11 tests). ### 2. Keyboard prompt glyphs with the stock MNK bindings `run.rs` only installed the keyboard key-cap hook when a custom `VICTORY_MNK_BINDINGS` file was set, so the default `bindings.ini` path showed controller glyphs even with mouse and keyboard on. The hook now installs when keyboard prompts are requested regardless of whether bindings came from the default file or a custom one. On the test rig the log now reads `prompts keyboard keys: hook placed` and `the title loads the icon movie with key caps`. `cargo test -p victory-game --lib prompts` passes (36 tests). Both changes are small, independent and text-only. No game data is included.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 04:28:17 +00:00
Author
Owner

@⁠Trillazill on GitHub · 2026-11-30 05:13 UTC · original

Reviewed against 41adb551. I think the run.rs half would show the wrong keys, and the shader_cache.rs half is already in two open PRs.

run.rs: the key caps aren't the keys of bindings.ini. The prompts hook draws each icon as victory_core::pad::fallback_key, the keyboard's stand-in gamepad (prompts.rs: "each icon becomes the key that the keyboard's stand-in gamepad binds to the icon's control"). bindings.ini, which victory play writes when MOUSE AND KEYBOARD is on, is the MnK profile, with different keys for most controls:

control key cap (pad.rs) bindings.ini default
X X Space
Y Y F
LB Q Tab
RB E Q
LT / RT Z / C Mouse2 / Mouse1
left stick click F Ctrl
View Tab V

So with this change, an MnK player who sees "press Q" would get LB on the stand-in pad's keys but RB on theirs, and "press F" means LS for one and Y for the other. Main's early return is there for that. fea7bb3c, which added it, also says so in the README: "The optional custom mouse-and-keyboard profile continues to use gamepad prompts." With the defaults written unchanged, the keys still differ, so the comment "The key glyphs are the stock Victory bindings. victory play writes that same file" doesn't hold.

Keyboard prompts with MnK on would need the icons drawn from the parsed bindings.ini (mnk::parse, private to victory-hle today) rather than fallback_key, and redrawn if #3722 lands (it reads the file again while the game runs). That's a bigger change than this one. Until then, the gamepad pictures are the honest choice there. If that README line is hard to find, a pointer from the log line (prompts gamepad pictures: ...) might help more.

shader_cache.rs: the same edit (VICTORY_SCALAR_SPLITS out of KEYED, the four VICTORY_ORACLE_* names out of the "not keyed" list) is in #3385 and #3530, line for line. Those two also drop the AtomicBool import. Splitting this half off, or dropping it in favour of whichever of those lands first, would save a conflict.

**@⁠Trillazill** on GitHub · 2026-11-30 05:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3708#issuecomment-7269472044) Reviewed against 41adb551. I think the `run.rs` half would show the wrong keys, and the `shader_cache.rs` half is already in two open PRs. **`run.rs`: the key caps aren't the keys of `bindings.ini`.** The prompts hook draws each icon as `victory_core::pad::fallback_key`, the keyboard's stand-in gamepad (`prompts.rs`: "each icon becomes the key that the keyboard's stand-in gamepad binds to the icon's control"). `bindings.ini`, which `victory play` writes when MOUSE AND KEYBOARD is on, is the MnK profile, with different keys for most controls: | control | key cap (`pad.rs`) | `bindings.ini` default | | --- | --- | --- | | X | X | Space | | Y | Y | F | | LB | Q | Tab | | RB | E | Q | | LT / RT | Z / C | Mouse2 / Mouse1 | | left stick click | F | Ctrl | | View | Tab | V | So with this change, an MnK player who sees "press Q" would get LB on the stand-in pad's keys but RB on theirs, and "press F" means LS for one and Y for the other. Main's early return is there for that. fea7bb3c, which added it, also says so in the README: "The optional custom mouse-and-keyboard profile continues to use gamepad prompts." With the defaults written unchanged, the keys still differ, so the comment "The key glyphs are the stock Victory bindings. `victory play` writes that same file" doesn't hold. Keyboard prompts with MnK on would need the icons drawn from the parsed `bindings.ini` (`mnk::parse`, private to `victory-hle` today) rather than `fallback_key`, and redrawn if #3722 lands (it reads the file again while the game runs). That's a bigger change than this one. Until then, the gamepad pictures are the honest choice there. If that README line is hard to find, a pointer from the log line (`prompts gamepad pictures: ...`) might help more. **`shader_cache.rs`:** the same edit (`VICTORY_SCALAR_SPLITS` out of `KEYED`, the four `VICTORY_ORACLE_*` names out of the "not keyed" list) is in #3385 and #3530, line for line. Those two also drop the `AtomicBool` import. Splitting this half off, or dropping it in favour of whichever of those lands first, would save a conflict.
github-bot closed this pull request 2026-12-01 18:51:29 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:49 UTC · original

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.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:49 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3708#issuecomment-7321620491) 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

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!3708
No description provided.