fix(widescreen): the system overlay's header and prompts follow the mod switched off and on #3281
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3281
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:fix/widescreen-squeeze-restart"
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?
Summary
Follow-up to #3218, from BeanBot's review of it (L1 and its question). #3218 draws the system overlay's header and button prompts (
N_Header_00,N_Footer_00ofSystemOverlay_00) at their own shape in the middle 16:9 when Ultrawide menus is Centred on a picture wider than 16:9. Switching the Widescreen mod off and on while the game runs (Mods tab, Built in > Widescreen) broke that both ways:ui.layoutBuilt), and the overlay, built once at boot, gets no build after a restart.This fixes both:
Ui::placednotes a layout's squeezed panes the first time it places the layout's root. The start's forced pass places the root before the panes made from it.Ui::releasemarks every pane of a layout with squeezed panes for its transform to be made again, as the start's forced pass does.Read first:
placed,note_squeezedandreleaseingame/mods/widescreen/src/panes.rs.Testing
Tested: Windows 11, RTX 3080 (NVIDIA 621.47), 21:9 (
HOS_ASPECT=2.3889), Ultrawide menus at its default (Centred), headless through the control bridge, onf359e2621+ #3218's commit, with and without this PR's commits (the same diff as this branch). Title screen > Continue, the Load list open; a local copy of the mod inspector (HOS_SYSTEM_MODS_DIR) switched the Widescreen mod off and on again withsetEnabled, as the Mods tab's switch does; a shot with the mod on, one 3 s after it was switched off, one 3 s after it was switched on again.cargo fmt --checkclean; Onmainde6fb7b5d:cargo test -p sysmod-widescreen: 68 passed, 1 failed,sides::tests::the_renderer_names_no_program_of_ours, which fails the same onmain(#2966'sgpu/vk/vk_rt_*.cppname the fog composite's hash1a7482c0ec9991ea);cargo clippy -p sysmod-widescreen --all-targets: nothing in this crate.Still to test:
Measurements
Not measured: a layout's root placed for the first time costs one more look at its root's name (the overlay's panes are noted only for an overlay); stopping the mod marks one layout's panes once.
Risks
The Widescreen mod only, and only when the mod starts with layouts already built or stops. No setting, save or cache changes; a revert is enough.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Not run whole yet: the crate's checks above.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here (a_system_overlay_built_before_the_mod_started_has_its_prompts_squeezed_from_its_root_s_first_placing,the_mod_stopped_has_the_squeezed_overlay_s_panes_remade_at_the_game_s_shape).mainand here, for a change that shows on screen. The before and after shots are game pictures, kept on the PC; Tested describes them.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: Windows 11, RTX 3080 (NVIDIA 621.47), 21:9, Ultrawide menus Centred, headless through the control bridge,
f359e2621+ #3218's commit with and without these commits: title > Continue, the Load list open while the Widescreen mod is switched off and on (setEnabled, as the Mods tab). #3218 alone: off, the header and Back stayed squeezed; on again, stretched across the picture. Here: off, the game's own shape; on again, in the middle 16:9.@review
Recommendation: Approve. The reported Windows run shows the header and prompts returning to the intended shape after switching the mod off and on. The pull request is still WIP, its checks are running, and the requested real-window test remains outstanding. Nothing blocking is left. Recommend approval; not approved on the forge.
Restores the system overlay’s header and prompts when Widescreen is stopped and rediscovers them when it restarts. The change adds one layout scan when a root is first seen and marks the affected layout’s panes on shutdown.
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes. The reported Windows 11, RTX 3080 run at 21:9 reproduced both incorrect states before the change and showed the expected result after it; this is a correctness fix, not a performance claim.
Other systems: The change affects Widescreen’s layout handling on Windows and Linux, including other menu modes and aspect ratios. The existing squeeze test covers centred, full-width and 16:9 cases; a real-window run through the Mods tab is still planned. Linux/AMD testing is also listed by the author.
Switches: None added, changed or removed.
Reviewed:
dd65726d0fagainstde6fb7b5d8: Read the changed panes.rs in full, its diff and commits, repository rules, standards and pull request template. Read the relevant layout memory, planner, hook and mod lifecycle code; skimmed the remaining widescreen code. The referenced Tooling checkout and docs/review-checklist.md were not present. No generated files or recorded runs were changed.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no commands from the project or tests were run. The author reports a game run and crate checks; CI is still running.
Overlaps and merge order: The description identifies this as a follow-up to #3218; other open pull requests could not be checked with the network closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
WIP: fix(widescreen): the system overlay's header and prompts follow the mod switched off and onto fix(widescreen): the system overlay's header and prompts follow the mod switched off and on