feat(widescreen): the title screen's movies fill a wider screen (Fill title screen) #3016
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!3016
Loading…
Reference in a new issue
No description provided.
Delete branch "SplitShotz/Longshot:feat/title-movie-fill-mod-api"
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
For
mod-api. The same feature as #2988 onmain, on the Rust game side: on a screen wider than 16:9 the title screen's movies (Event/Movie/Dm_Title_*.webm: Link riding across Hyrule Field and the scenes after it) are zoomed to the screen's width, their top and bottom trimmed (about 13% each at 21:9), instead of sitting in the middle 16:9 with black beside them. The story movies keep their 16:9. A new row of the widescreen system mod, Fill title screen (fill_title_screen, a toggle, on), placed after Ultrawide menus, turns it off. The key and its values are the same as #2988's, so alongshot_options.iniwritten by either reads the same.Why a separate PR: HumanBean asked on #2988 to rebase it on
mod-api, but the C files it changes (game/oot_wide_sites.c,game/menu/rows.c,game/options.h) aren't on this branch, so the feature is ported here instead, and #2988 stays onmainfor the game as it is until #2822 lands.Read first:
game/mods/widescreen/src/state.rs(movie_opened,title_fill_now) andwide.rs(movie'sfill), then the lines at the end ofhost/nn_fs.c'sOpenFile.host/nn_fs.c: OpenFile tellsgame.h'shos_movie_openedabout each.webmread open, after the handle is made, so a movie that fails to open changes nothing.longshot-gameexports it (sysmods.rs) oversysmod_widescreen::movie_opened;game.hregenerated withcargo run -p ffi-gen.sysmod-widescreen:state.rskeeps whether the movie opened last is one of the title's in anAtomicBool(relaxed, since the opening thread writes it and the movie draw's thread reads it, and it guards no other data), logged at each change (wide: the title screen's movies (...)), and the row's value, published bypublish_rowslike the other rows.wide::movietakesfill: with it on and a wider picture (margin between 0 and 0.5), the viewport's top and bottom move out bymargin / (1 - 2 margin)of its height instead of its sides moving in. Vulkan takes a viewport past the target; the renderer's scissor stays clamped to it.mod.toml: the row (order 55, after Ultrawide menus), last in the file so the other rows keep their indexes;lib.rs's keys.docs/user/graphics-and-controls.md: the row's line after Ultrawide menus, and the ultrawide tip names the title screen as the exception to movies keeping 16:9. The mod's README names the row and the new place the host reaches it.tests/test_menu_ini_keys.py's FROZEN andmenu.test.ts's PLACED gain the key.Testing
Tested: in the game, by the author, on Garuda Linux (kernel 7.3.5-zen), NVIDIA GeForce RTX 4060, driver 620.73.04:
839b111built (dev.py game --quick) and run headless at 3440 x 1440 (HOS_OUTPUT_RES,HOS_ASPECT=2.3889), Ultrawide menus at Extended, with its own profile; on the title's first movie, Fill title screen set through the control bridge, off then on a few frames apart: off, the movie in the middle 16:9 with bars beside it; on, filling the screen (pictures in the first comment). #2988's version of the same change was run in the game onmainat 21:9 through the title menu, and measured there.Checks, on Linux (clang):
cargo test -p sysmod-widescreen -p longshot-game: pass, with the new cases:wide.rs: 21:9 and 32:9 filled, 16:9 and 16:10 as without it, a margin not known or out of range as without it;state.rs: a title movie then the title's next one selected, the row off, a story movie, the title's again;settings.rs,system_mod.rs: the row's key, default and count.cargo clippy -p sysmod-widescreen -p longshot-game --all-targets -- -D warnings,cargo fmt --check,cargo run -p ffi-gen -- --check: pass.cargo test -p modtool(the built-in mods checked, and the menu's tests, which hold the layout and the settings page's table to the rows): 246 passed.tests/test_vcore_fs_open.py: OpenFile tells a.webmread open once, by its path, once it is open, and not a file that is no movie, a movie that fails to open, is left out (HOS_NO_MOVIES), is missing from the.nup's index or is opened to write;game.hdeclares it andlongshot-gameexports it over the mod's. It fails with the call before the open and without it.run_all.py --strict --changed origin/mod-api(the checks that read the changed files): 89 passed, 1 skipped.dev.py game-tests game/mods/widescreendid not run here: the test mode refuses to load asystem/mod from its folder ("mod.toml, id: system/ is Longshot's own built-in mods"), with or without this change.Still to test: None.
Measurements
Measured on #2988's version (
main,a59f1d2), the same viewport change at the same draw: on the title menu at 21:9, Fill title screen off against on, three interleaved pairs, 243.0 against 236.4 fps (median run), +0.11 ms median frame time, within the spread (off 210 to 247, on 233 to 245). #2988's Measurements has the table and the runs. Here the check per movie draw is two relaxed atomic loads.Risks
Only the title screen on a screen wider than 16:9 changes. If the game opened a title movie file while a story movie plays, that story movie would be zoomed too; the log line says which movie was opened last. Turn it off with Fill title screen. After updating, players on a wider screen see the title screen filled.
Checklist
Ready for review
mod-api; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (The checks that read the changed files, as Testing says.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.check_host_compile.pywith llvm-mingw 20261104,RX_TARGET=windows: 81 host units, 0 failed; Linux built and run. The new call compares the guest's path as bytes, as OpenFile already does for.webm.)mainand here, for a change that shows on screen. (Off, the base's path, and on: first comment.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
🤖 Generated with Claude Code
Tested in game: Garuda Linux (kernel 7.3.5-zen), RTX 4060, NVIDIA 620.73.04:
839b111run headless at 3440 x 1440 (21:9), Ultrawide menus Extended; the title's first movie with Fill title screen off (bars beside the middle 16:9) and on (the movie fills the screen).Screenshots: the title's first movie (Link riding across Hyrule Field) at 3440 x 1440 (21:9), Aspect ratio at the monitor's shape (
HOS_ASPECT=2.3889), Ultrawide menus at Extended. One headless run of839b111(dev.py game --quick,longshot_ctl.py launch --profile test), Fill title screen set through the bridge between the two shots, a few frames apart. Off takesmod-api's path throughwide::movie(the new branch is skipped), so it is the same picture asmod-api.Top: Fill title screen off (as
mod-api). Bottom: on (this pull request).839b111eba9a8912a43bRebased onto
main(267b4e4f) and force-pushed:9a8912a4, was839b111e.One conflict, in
game/mods/menu/test/menu.test.ts: keptmain's newframe_rate_cap_customrow and addedfill_title_screenafterultrawide_menus.Checks:
cargo test -p sysmod-widescreen -p longshot-game -p modtool,ffi-gen --checkand three Python checks passed on an earlier base (d984fd70); the final head was pushed without checks and not run in the game.(Posted by Claude Code.)
WIP: feat(widescreen): the title screen's movies fill a wider screen (Fill title screen)to feat(widescreen): the title screen's movies fill a wider screen (Fill title screen)@review
Recommendation: Approve. The code is ready: only testing is left. The reported run shows the first title movie filling a 21:9 screen, but the final head and the other affected Tier 1 systems have not been exercised. Movie transitions and the claimed unchanged story-movie behavior also need an in-game check. Recommend approval; not approved on the forge.
Adds an on-by-default setting that crops title-screen movies vertically to fill ultrawide displays, while retaining the existing framing for story movies. The viewport calculation is small and the setting is integrated into the existing widescreen mod, but identifying the active movie by the last file opened depends on the game's opening order.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
game/mods/widescreen/src/sites.rs:97: The final head's movie rendering and transitions have not been tested across the Tier 1 systems this viewport change can affect. (more on the line) Do: Run the final head through the title movie loop and a story movie with Fill on and off, including a centred menu mode, on the affected Tier 1 Windows and Linux GPU configurations and Steam Deck; check framing and rendering errors.Questions (1) (not confirmed from the code; they don't hold the recommendation)
Checks: Still running: 9 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven on the final head. The author reports that the first title movie filled 3440×1440 on an earlier head with the setting on; the final head was not run. Measurements on the separate #2988 implementation report median 243.0 fps off and 236.4 fps on, with overlapping run spreads, so they do not establish a performance difference for this PR.
Other systems: The viewport change can affect Vulkan drivers on Windows and Linux, including AMD and Steam Deck; only Linux/NVIDIA was reported tested. All movie draws use the last successfully opened WebM's classification, so title-to-title and title-to-story transitions need checking. Centred menu modes also draw their sides over the movie and were not covered by the reported run.
Switches: No environment switches added or changed. Fill title screen is a player setting, default On; its visual preference is reversible, but its behavior on the remaining affected systems is unverified.
Reviewed:
9a8912a43bagainst267b4e4fee: Read the repository rules, standards, PR template, complete diff, commit message, widescreen state, system mod, settings and host OpenFile path, and the changed OpenFile test. Skimmed the remaining changed files and surrounding renderer references; did not read every changed code file in full. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review).Checked and fine:
Testing: No commands from the project, builds, or tests were run during review. CI was still running on the final head; the reported in-game run was on an earlier head.
Overlaps and merge order: #2988 implements the corresponding feature on the other game branch; the description says it remains there until #2822 lands.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -96,2 +95,3 @@/// `wide.movie`: pre-rendered movies in the middle 16:9, the title screen's at the picture's width (Fill title screen).fn movie(cx: &mut SiteCx<'_, '_>) -> i32 {wide::movie(cx.guest(), picture::margin(), picture::ratio());wide::movie(cx.guest(), picture::margin(), picture::ratio(), crate::state::title_fill_now());L1 (should fix): The final head's movie rendering and transitions have not been tested across the Tier 1 systems this viewport change can affect.
When: The reported run covers only the first title movie on an earlier head, with Extended menus on Linux/NVIDIA; the final head, story movies, centred menu modes, Windows, AMD and Steam Deck remain unverified.
Do: Run the final head through the title movie loop and a story movie with Fill on and off, including a centred menu mode, on the affected Tier 1 Windows and Linux GPU configurations and Steam Deck; check framing and rendering errors.
@fix
9a8912a43b02412b7b2eRecommendation: Approve. The code is ready: only testing is left. The title-screen fill was shown working on Linux with NVIDIA hardware, but movie rendering and transitions still need coverage across the affected Tier 1 systems. Recommend approval; not approved on the forge.
What
@fixchangedI changed this pull request: the new head is
02412b7b2e. I rebased it ontomain(4007f6eae4).Conflicts resolved
Nothing was built or run: the checks run again on the new head.
On screens wider than 16:9, title movies fill the width by cropping their top and bottom. The feature adds a setting and movie identification state; story movies retain their existing presentation.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
game/mods/widescreen/src/sites.rs:97: The final head's movie rendering and transitions have not been tested across the Tier 1 systems this viewport change can affect. When: The reported run covers only the first title movie on an earlier head, with Extended menus on Linux/NVIDIA; the final head, story movies, centred menu modes, Windows, AMD and Steam Deck remain unverified. Do: Run the final head through the title movie loop and a story movie with Fill on and off, including a centred menu mode, on the affected Tier 1 Windows and Linux GPU configurations and Steam Deck; check framing and rendering errors.Checks: they run again on this head (
CI / Host C for Windows (llvm-mingw, compile only) (pull_request),CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request),CI / Website build and checks (pull_request),CI / Game-free checks (run_all.py, part 2/2) (pull_request),CI / Game-free checks (run_all.py, part 1/2) (pull_request)failed on the last one); a failure shows on the pull request.More: does it help, other systems, switches, what was read
Does it help: Yes: the author reports the first title movie filling a 3440×1440 screen on Linux with an RTX 4060. The final rebased head has not been run in the game. The related main-branch implementation measured 243.0 fps off versus 236.4 fps on, with a 0.11 ms median frame-time increase within the reported spread.
Other systems: The movie viewport path can affect other Vulkan drivers and operating systems; Tier 1 coverage and movie transitions remain untested. Narrower screens use the existing viewport path, including the Steam Deck's 16:10 aspect ratio.
Switches: Fill title screen (fill_title_screen) is added and defaults to On. It can be disabled immediately; the default delivers the feature, but cross-system behavior remains to be tested.
Reviewed:
02412b7b2eagainst4007f6eae4: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the changed documentation diff, and the movie hook and state code. Skimmed the remaining widescreen implementation and recorded test claims; the other changed files and full diff were not read in full. docs/review-checklist.md was absent.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run the project were executed. The supplied CI status says checks have not yet run on this head.
Overlaps and merge order: #2988 implements the corresponding feature on main; this pull request ports it to the mod-api game side.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.