fix(ui): Extended ultrawide menus: the item carousel's right side no longer cut off #2621
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2621
Loading…
Reference in a new issue
No description provided.
Delete branch "bulldogsajr22/Longshot:fix/ultrawide-carousel"
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
With Ultrawide menus at Extended on a picture wider than 16:9, the item quick select carousel (
PaShortCutSlideList_00) leaves out items on its right side. It opens looking right, but once the selection has moved a few items to the right, the items after it stop partway across the screen and the rest of the right side stays empty, though the list goes on.To see it on
main: 5120x2160 (21:9), Ultrawide menus at Extended, a save with a full item list (14 items here, sorted By Recently Selected). Open the item quick select and turn right 6 times. The left side fills out to the screen's edge (5 items, as many as fit), but only 3 of the 7 items after the selection are drawn, and the right fifth of the screen is empty.Why: the carousel's list engine (
f_8151eb00) counts its item slots once, from its pane's width, when it is set up as the save loads. Extended widened the list only later, after its layout was built (ui.layoutBuilt), so the count was made at the 16:9 width: 10 slots. A wider picture shows more items than that; every slot holds one, the engine takes no slot from an item still on screen (f_815230c0), and the items past them get none and are not drawn.This adds a site,
ui.listSetup(inf_8151eb00, aftermov x19, x0; x19 is the engine), that widens a list kept at the screen's width before its engine counts its slots. It uses the stepui.layoutBuiltalready took, nowwiden_kept_list, which first puts back a width an earlier call set, so the two calls never compound. The engine then makes as many slots as the wide list holds: 13 at 5120x2160, 18 at 32:9 (5120x1440). Only a list with theRULE_KEEP_WIDErule is touched (today only this carousel), and only with Extended on a picture wider than 16:9.Read first:
hos_wide_ui_list_setupandwiden_kept_listingame/hos_wide_ui.c, then the site ingame/sites/sites.tomland its location ingame/sites/e0f3ccfaf50065ae4ea01eb5aeb13b1a45da3348/locations.toml.No issue was open for it (searched open, merged and closed issues and pull requests). See #1892, which added Extended and the carousel's widening at its layout's build.
Testing
Tested: Windows 11 Pro (26H2, build 26300), RTX 5090, NVIDIA 621.40, 5120x2160 with HDR. In the game, with this branch plus logging commits on top (logging only, not part of this pull request); Ultrawide menus at Extended unless said otherwise.
maindrew 3 on the right. Closed, reopened and turned right 8 more times: the same.main(10 slots, in the middle 16:9).main(10 slots from 4760), turned both ways with nothing drawn outside the picture.main: 10 from 4760) and 18 from 8600 at 32:9. The two other lists this site sees,SystemLoadList_00(6 slots) andPaChallengeIndexSlideList_00(10 slots), are counted as onmain.Checks:
tests/test_wide_ui.pypasses. Onmain's behaviour (mainwith this branch's site wiring and an emptyhos_wide_ui_list_setup, so the fixture links) it fails at the new check right after the engine's setup,near(getf(list + PANE_W), 3840 / hos_wide_squeeze): the list is still 3840 wide when its slots are counted.game/hos_wide_ui.candgame/oot_wide_sites.ccompile for x86_64 Linux (clang 22, the build's host flags with-Wall -Wextra: no warnings, as onmain) and for Windows in this branch's game builds (the builder's llvm-mingw).mise run testpasses, on Linux (WSL, Ubuntu), withmise.toml's pinned tools andmise run test-deps, and the CI image's packages (gcc 15, clang 21, lld, llvm-mc, spirv-tools, libdav1d-dev, cmake): this head 849 pass, 1 fails, 9 skipped;main@4d1e555fthe same 849 and the same one,tests/test_linux_saves_move.py, which needs the file system to list a folder's entries in an order this one doesn't give ("no names put both kinds of entry before stuck/ in this listing").096323ad, caughtui.listSetup's signature: 11 words, where the sites crate's repository test (tests/test_lifter.py) allows 8.f7379471makes it the last 4 (the setup call's arguments and the site's ownmov x19, x0), found exactly once in the supported build, atf_8151eb00+ 0x40; the site's offset is unchanged. A game build fromf7379471places all 143 sites, as 096323ad's did, and compiles the same game code (every object from its cache).Still to test:
@Beanstalk)Not changed here (as on
main, reported as #2630): the carousel's slots are counted once, as the save loads, and its width is set when it is first opened; a later change to Ultrawide menus doesn't reach it until the game restarts. Switched from Extended to Centred after it has been opened, its items run into the blurred sides; switched from Centred to Extended, it stays at 16:9 (both seen in the game onmaintoo). Started at Centred and switched to Extended before the carousel is first opened, it is widened but keeps the 10 slots counted at load (the log shows 10), so it is cut off on the right as onmain. A later change could set the list up again when the choice changes (#2630).Measurements
Verdict: fixed: at 5120x2160 with Extended the carousel counts 13 item slots instead of 10, and draws every item out to the screen's right edge (
main: 3 of the 7 items after the selection).Baseline: the slot counts on the
mainside come frommain@4d1e555fwith logging commits only. Its screenshot comes from nightly-835 (201f8868), one commit behind4d1e555f, which changes only the release workflows, their doc and their test; the game's code is the same.Setup: Windows 11 Pro 26300, RTX 5090, NVIDIA 621.40; 5120x2160 with HDR (5120x1440 for 32:9), Ultrawide menus at Extended; the Ice Cavern save, 14 items, By Recently Selected; the slot counts from the logging commits' lines in
longshot_log.txt, the items counted on the screenshots in #2621 (comment). The After column was measured at096323ad;f7379471changes only the words that find the site, not where it is placed, and its build compiles the same game code.4d1e555f096323admaincounts at 21:9 before the fix)SystemLoadList_00/PaChallengeIndexSlideList_00slotstests/test_wide_ui.pyRisks
A list kept at the screen's width is now widened as its engine is set up, as well as when its layout is built. Today that is only the item carousel. It now counts more slots than before (3 more at 5120x2160, 8 more at 32:9), each a cell layout the game makes as it does for its own 10, once as the save loads; nothing runs per frame. That memory is not measured: a few of the game's own cell layouts. Ultrawide menus at any other choice (Full width, either Centred), and pictures of 16:9 or narrower, are unchanged: the site does nothing then. If it misbehaves, any Ultrawide menus choice but Extended avoids it; a revert is enough. Nothing changes in saves,
longshot_options.inior the caches.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (849 of 850 on Linux;tests/test_linux_saves_move.pyfails the same onmain: see Testing.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.mainand here, for a change that shows on screen. In #2621 (comment).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 Pro 26H2 (26300), RTX 5090, NVIDIA 621.40, 5120x2160 HDR, Ice Cavern save: with Extended, the carousel draws every item to both screen edges at 21:9 and 32:9 (main: 3 of 7 after the selection at 21:9); 16:9 and Centred unchanged.
Possibly related, for context:
Screenshots, the same spot (Ice Cavern, 5120x2160, Ultrawide menus at Extended, By Recently Selected, the item quick select turned right 6 times, the Hookshot selected):
main (nightly-835,
201f8868, one commit behind4d1e555f): 5 items before the selection, only 3 of the 7 after it drawn, the right side empty.This PR: every item drawn out to both screen edges, 5 on each side.
(Both look bright and washed out: NVIDIA's RTX HDR overlay was on during those runs, not the game.)
@Beanstalk linux, amd: this head (
096323ad) againstmain@4d1e555f, the same steps on each.kokiri-start. On the Insert menu's Debug tab, Inventory (Edit items), unlock every item in the Items section (the quantity ones set above 0), at least 14, then close the menu.Expected on this PR: items drawn out to both screen edges. On
main: only some of the items after the selection are drawn and the right part of the screen is empty. Alongshot_log.txtfrom each side is welcome too.@bulldogsajr22 only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it or to this comment.This request was for096323a, and the PR has changed since (f737947), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.WIP: fix(ui): Extended ultrawide menus: the item carousel's right side no longer cut offto fix(ui): Extended ultrawide menus: the item carousel's right side no longer cut offPushed
f7379471:ui.listSetup's signature is now 4 words instead of 11.A full
mise run teston Linux caught it: the sites crate's repository test (intests/test_lifter.py) allows a signature of at most 8 words, as few as find the site. The new one is the last 4 (sub x1, x29, #0x88; sub x2, x29, #0x90; mov w4, #2; mov x19, x0), found exactly once in the supported build atf_8151eb00+ 0x40; the site's offset (0x4c) is unchanged.mise run testatf7379471: 849 pass, 1 fails, 9 skipped;main@4d1e555fthe same, the one failuretests/test_linux_saves_move.pyon both (it needs a folder listing order this file system doesn't give).f7379471places all 143 sites, as 096323ad's did, and compiles the same game code (every object from its cache), so the in-game results and the screenshots still hold.The Test Farm request was for
096323ad, so it needs asking again for this head.@Beanstalk linux, amd: this head (
f7379471) againstmain@4d1e555f, the same steps on each.kokiri-start. On the Insert menu's Debug tab, Inventory (Edit items), unlock every item in the Items section (the quantity ones set above 0), at least 14, then close the menu.Expected on this PR: items drawn out to both screen edges. On
main: only some of the items after the selection are drawn and the right part of the screen is empty. Alongshot_log.txtfrom each side is welcome too.@bulldogsajr22 only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it or to this comment.This request was forf737947, and the PR has changed since (d0df4b8), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.Merged
main@a3591a98into the branch (head3c21b96a, no conflicts). The measurements, taken onmain@4d1e555f, still hold on this base: none of the 15 commits between4d1e555fanda3591a98touch the PR's files (game/hos_wide_ui.c,game/oot_wide_sites.c,game/sites.def,game/sites/*,tests/test_wide_ui.py,tests/test_wide_sites.py), the item carousel or the Ultrawide menus code, and the PR's diff againstmainis the same 7 files as before.@Beanstalk linux, amd: this head (
3c21b96a) againstmain@a3591a98, the same steps on each.kokiri-start. On the Insert menu's Debug tab, Inventory (Edit items), unlock every item in the Items section (the quantity ones set above 0), at least 14, then close the menu.Expected on this PR: items drawn out to both screen edges. On
main: only some of the items after the selection are drawn and the right part of the screen is empty. Alongshot_log.txtfrom each side is welcome too.@bulldogsajr22 only members of
BigBeanscan start the farm. One of them can approve this request by reacting 👍 to it or to this comment.@review
Recommendation: Approve. The carousel fix is demonstrated on Windows, but CI and the requested Linux/AMD run are still pending. Nothing blocking is left. Recommend approval; not approved on the forge.
The change widens the item carousel before its engine counts slots, allowing more items to appear across an ultrawide screen. It adds a setup hook and allocates additional game cell layouts.
Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes. On Windows at 5120×2160 with Extended menus, the reported comparison increased the slot count from 10 to 13 and showed five items after the selection instead of three. The reported 32:9 run counted 18 slots.
Other systems: The hook also sees other lists; the reported Windows run found unchanged counts for the system load and challenge lists. Linux/AMD testing is pending. The added cell-layout memory cost is not measured.
Switches: None added, changed or removed.
Reviewed:
3c21b96a91againsta3591a98c9: Read the diff, commit messages, repository rules, PR template, standards, hook documentation, and the changed setup and layout code with its planner and restoration paths. Skimmed the remaining portions of the large changed code, test and site-table files; they were not all read in full. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run during this review. The author reports game-free checks and a Windows in-game comparison; CI is still running and the Linux/AMD Test Farm run is pending.
Overlaps and merge order: None found in the supplied PR information; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.