MnK: a bindings.ini saved by hand is read again while the game runs (#1283) #3722
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3722"
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 sansj24k on 2026-11-30T04:48:51Z.
Fixes #1283
What it changes
#1283 has two halves. The F1 half (KEY BINDINGS saved, old bindings still used) was fixed on main by
234456f2(refresh()). This is the other half: "I set up my keybinds in bindings.ini, but they didn't take effect in-game".1. A save by hand was never read again. Only F1's KEY BINDINGS moved
MNK_BINDINGS_CHANGED, soconfig()read the file once and then not again: a key changed inbindings.iniwith the game running did nothing until a restart.hand_edits()now looks at the file's modification time at most once a second (the pad poll runs every few ms, so it does not stat the file each time) and counts each save.config()adds that count to the write counter, sorefresh()reads the file again. Nothing else inrefresh()changes: a save that does not parse keeps the last bindings, as a KEY BINDINGS write already does. A KEY BINDINGS write now also moves the file's time, so the file is read once more a second later. That read is harmless: it is the same file.2. The README named the wrong file, in effect. It said only "
bindings.ini". The repository has one at its root, but both launchers (play.rs,play-foxhound.ps1) start the game with%LOCALAPPDATA%\victory\bindings.ini(VICTORY_HOMEwhen set), copied from the repository's file the first time. Editing the repository's file afterwards changes nothing, which is likely what the reporter did. The README now names the file, points at the console'smouse/keyboard on:line that prints it, and says that both ways of editing apply while the game runs.How it was tested
a_bindings_file_saved_by_hand_counts_as_an_edit: the first look is not an edit, it looks again only after a second, and an unchanged time, a save and a replaced file (gone, then back) are each counted correctly. No file named means no edits.cargo test -p victory-hle --lib: 422 passed (plus the flakyxmemrange-lock test, see #2439 / #3621).cargo clippy -p victory-hle --all-targets --no-deps -- -D warnings: the same 5 errors as on main (gameinput.rs,lifecycle.rs), none inmnk.rs. The workspace gate fails on main for the reasons #2019 / #3530 fix.cargo xtask policy --staged: ok.cargo testpassed for the crates it touches: yes (victory-hle, apart from the known flaky test above).Checked for overlap
MNK_BINDINGS_CHANGEDin its rewrite of the MnK layout, so whichever of the two lands second needs a small rebase. #2545, #2866, #1949, #3055 and #1913 touchmnk.rsbut notconfig()/refresh().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.