loader: an unset VICTORY_FRAME_INTERVAL_MS leaves the title's rate alone #400
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!400
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-400"
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?
@h-dowd on GitHub · 2026-12-04 00:23 UTC · original
h-dowd:fix/frame-interval-loader-default→main· +4 −1 · 1 files · 1 commits · merged 2026-12-04 18:48 UTCFollow-up to #261, which made
victory-gpu's frame clock follow the title whenVICTORY_FRAME_INTERVAL_MSis unset.Cause. The switch is read in two places. #261 fixed
victory-gpu/src/frame.rs, butvictory-loader/src/frame_rate.rs(asked_interval_ms) still read unset as"10". So at load the title's two reads of its frame rate setting were patched to rate 100, and the frame clock, now following the title, followed that patched interval: 16.667 ms in the world instead of the title's 33.333 ms.docs/SETTINGS.mdsays "Unset follows the title", andtitlealready gave that behaviour.Change. Unset now returns
Nonein the loader too, so nothing is patched: the same one-line change #261 made in the frame clock.titleand explicit milliseconds behave as before.Measured (release build, RX 9070 XT, Series X,
VICTORY_FRAME_INTERVAL_MSunset in both runs):rate=100)frame intervallinesinterval=16.667ms title=16.667msinterval=33.333ms title=33.333msThe two runs used different presets; the interval and patch lines are what this change affects.
frame_rateunit tests pass (4/4); none of them covers the unset case, since it depends on the process environment.🤖 Generated with Claude Code
@Kal0s-design on GitHub · 2026-12-04 07:32 UTC · original
Checked
500e68d. Looks right to me.The only caller of
asked_interval_ms()is the loader step inapps/victory/src/run.rs:369. WithSome(ms)it turns that into a title rate (title_rate,frame_rate.rs:76-83) and patches the setting reads. WithNonethe whole block is skipped and the title keeps its 30. So on main an unset variable meantSome(10), whichtitle_rateturns into 100, and the title got patched to 100. Nothing else calls it.The
72e5d49claim holds. That commit changedcrates/victory-gpu/src/frame.rs:45from the sameunwrap_or_else(|_| "10".into())to.ok()?, and72e5d49is an ancestor of this head. So on main the clock follows the title when the variable is unset, but the loader still forced rate 100. This PR makes the two agree, and the module doc atframe_rate.rs:1("off without it") is now actually true.Docs and launchers already describe the new behaviour, so nothing goes stale.
docs/SETTINGS.md:20andREADME.md:122both list the default as unset, and SETTINGS says "Unset follows the title".run.conf.default:195-199says "Unset follows the title" and ships the line empty. I found no launcher, preset or config that relies on 10. None of the files underpresets/set it.titleand malformed values work the same as before (frame_rate.rs:52-61). An empty value, which you get if someone uncommentsVICTORY_FRAME_INTERVAL_MS=in run.conf (run.sh sources it withset -a), is a parse failure that prints the warning and returnsNone. That was already true before this change, and the gpu side does the same.On a non-unicode value,
varreturnsErr. Before, that fell back to "10" and the title got rate 100. Now it is a silentNone, which matches what frame.rs:45 does. It's arguably better than before, since it no longer disagrees with the clock. Not worth switching tovar_osfor.One side effect worth knowing about.
VICTORY_TITLE_FPSis only read inside thatSomebranch (run.rs:371), so setting it withoutVICTORY_FRAME_INTERVAL_MSnow does nothing. Before, it worked on top of the hidden 10 ms default. It only shows up in code comments (run.rs:366 and frame_rate.rs:74), not in the user docs, so probably fine. If it's meant to work on its own, though, the docs should say it needs the interval set.Tests ran natively on Windows (MSVC toolchain, not Wine).
cargo test -p victory-loader --libgave 84 passed, 0 failed. Main has moved since the PR base but none of the touched files changed, and the PR still merges cleanly onto current main.AI-assisted: yes
@Luxuride on GitHub · 2026-12-04 11:16 UTC · original
This is the missing half of
72e5d49:crates/victory-loader/src/frame_rate.rs:48still manufactures"10"on unset whilecrates/victory-gpu/src/frame.rs:45already returns?, and.ok()?here matches both the doc comment directly above it (frame_rate.rs:44-46) anddocs/SETTINGS.md:20. Malformed input still warns in both places, so no new parse split. Nothing to fix.Two things worth a sentence in the commit message, because both will surprise someone later:
VICTORY_TITLE_FPSis read insideif let Some(ms)inapps/victory/src/run.rs:369-371, so with the interval unset it is now silently inert. It was undocumented before, so this is a nit, but a user who settitle fps 30alone will see it stop doing anything.frame_ratetests still pass unchanged.I could not make it break anything: unset now means "patch nothing", which is what the setting's own text says.