fix(prompts): texts already on screen follow a new face at once (the HUD's item button) #1184

Open
gab9281 wants to merge 4 commits from gab9281/Longshot:fix/prompts-hud-texts-live into main
Member

Type: fix · Risk: medium · Tested on: Linux, Radeon 680M (RADV) · Needs: Windows, any GPU

Why

When you change Button prompts in the Insert menu while playing, many texts already on screen keep the old face until the next start. That includes the HUD's item button (R2/ZR under the item, and the R above it). New texts, such as an item's pop-up, do follow. The game lays these texts out once and never draws them through the hook that rewrites a text's button codes, so the change never reached them.

See #413 (its "stays on the connected pad's face" may be this, seen after a change in the menu).

How to reproduce

Seen on: Linux, Radeon 680M (RADV); main @ 71b1edd8
Settings and switches: Button prompts = PlayStation 5 at start
Steps: load a save with an item on ZR (here the slingshot), close the pause menu, then change Button prompts in the Insert menu to Xbox, Keyboard or Switch.
Expected: the item's labels change to RB/RT, R/X or R/ZR.
Actual: they stay R1/R2. With the keyboard face at start, they stay R/X under every face.

What changed

The text boxes seen with a button's code are now kept, and a change rewrites the ones still on screen and has the game lay them out and draw them again. Hint bars (the stick hints at the bottom of the screen, the ocarina's "Play a note" bar) are left as they are on main: laid out again on their own, the game draws them empty.

  • prompts: remember_box in host/prompts.c keeps each box the layout hook (hos_prompts_text_layout, f_8152aec0) sees with a button's code. Along with the box it keeps what says it's still that box: its class (+0), its status's address (+8), its text's address (+0xf0), its length and a hash of the text. A box drawn through the draw hook every frame already follows a change, so the per-frame hook doesn't keep anything. A box laid out again with no button code is dropped. The list holds up to 1024, and a full list replaces the box seen longest ago.
  • prompts: boxes_follow, called from live_font after the font is rewritten, rewrites each kept box that still matches all of those (text_rewrite, leaving the sticks' codes) and sets 0x20000 | 0x100000 in its status. Anything else (a box that's gone, another object, another text) is dropped and never written.
  • prompts: a box holding only stick icons ("Move", "Change View") isn't kept. Rewritten to the game's own stick icons at their STICK_GAME codes, the game laid them out again and drew them empty, under every face. The font does have those glyphs (checked: U+F8D6 maps to the same glyph as U+E05E), and marking 0x20000 alone did the same. In a box that mixes a button with a stick, the sweep leaves the stick's code as it is. stick_of() names a stick's code, including the key slot a stick icon gets on the keyboard face, for text_code, text_rewrite and has_button_code. box_text and code_at read a text's codes for all of them.
  • prompts: in_bar() leaves out a box in a bar of hints, one whose parent pane (+0xe0) has its word at +0x10 set. With the ocarina out, a change blanked every icon of its hint bar, as it had the stick hints, whichever status bits were marked (0x20000, 0x100000 or both). Rewriting without marking didn't redraw anything. The HUD item button's parent has that word clear, and the HUD needs the layout to show its new icon. Such a box keeps the face it had until the bar is shown again: the ocarina taken out after a change shows the new face. The parent words were read from the three parents involved (both hint bars, the HUD slot), so the rule rests on that sample.
  • prompts: mark_box sets the bits atomically, since the sweep runs beside the game's threads.
  • test: tests/test_prompt_boxes_follow.py (game-free), and tests/test_prompt_font_bind.py now also cuts stick_of.

Measurements

Verdict: it passes. The HUD's item button follows each change (PS5 → Xbox → keyboard → Switch). The stick hints and the ocarina's hint bar keep their icons, as on main. There's nothing to measure for speed: the sweep runs once per change, over at most 1024 boxes.

The numbers still hold on main @ 615b2498: none of the 13 commits main gained since 71b1edd8 touches the prompt code (host/prompts.c, host/pad_sdl.c, nx2/oot_patches.py, nx2/prompt_assets.py: no diff), and the final in-game check ran on this PR's last commit.

Hardware: Linux (CachyOS 7.3.4), Radeon 680M (RADV), Ryzen 9 6900HX
Scene: Kokiri Forest, Link's house, 1280x720 window
Method: a save made with the cheat menu (slingshot on ZR); Button prompts set to PS5 at start, then changed live through the control bridge to each face; screenshots 2 s and 12 s after each change; the log lines below.
How to reproduce: HOS_OOT_CHEATS=1; set Button prompts at start to PS5, equip the slingshot, then change Button prompts in the Insert menu.

Before: main @ 71b1edd8 After: this PR @ 26c066f6
HUD item labels after PS5 → Xbox R1 / R2 (unchanged) RB / RT
… → Keyboard R1 / R2 R / X
… → Switch R1 / R2 R / ZR
Stick hints ("Move", "Change View") after a change keep the start's icon keep the start's icon (unchanged; see Risks)
Ocarina out (d-pad left), then a change keeps the icons it opened with keeps the icons it opened with (unchanged); taken out again, the new face
prompts: now the xbox icons in texts, 16 buttons on these controls
prompts: 7 texts on screen laid out again with the new icons
prompts: now the keyboard icons in texts, 16 buttons on these controls
prompts: 7 texts on screen laid out again with the new icons
prompts: now the switch icons in texts, 16 buttons on these controls
prompts: 7 texts on screen laid out again with the new icons

Flags and settings

None.

Testing

Tested:

  • Game-free: tests/test_prompt_boxes_follow.py passes here and fails on main ("host/prompts.c keeps no text boxes for a change to rewrite"). The other tests/test_prompt*.py checks and test_utf8_paths.py pass. host/prompts.c compiles cleanly with clang (Linux) and llvm-mingw (Windows).
  • In game, Linux, Radeon 680M: as in Measurements; the screenshots are in the comment with the before/after image.

Not tested: Windows; other languages and resolutions.

Must be tested:

  • Windows, any GPU: the same steps as How to reproduce, expecting the item's labels to follow each face (by hand: the item slot at the top right).

Risks

What could break: texts on screen at a change get rewritten from outside the game's own text path, on the thread that applies the change (the controller poll), while the game may be drawing them. The 3 bytes of a code aren't written atomically, so a frame could draw a half-written code once. If the game's own update of a status word overwrites the bits set here, that box keeps its old face until it's next laid out. A box is written only while its class, status, text address, length and text hash all match, so a freed box would need all five to match before anything is written. The sweep holds its lock while it runs, so a layout at that moment waits; it runs once per change, over at most 1024 boxes. Still open, as on main: hint bars keep the face they were shown with until they're shown again. That means the stick hints keep their start face (for example L/R on the keyboard face rather than WASD), and the ocarina's bar keeps its face while it stays out. The bar rule reads a parent's word that was only observed on three parents: a bar it misses could still be drawn empty at a change (until it's shown again), and a non-bar box it catches keeps its old face, as on main.

Turning it off: revert the commit.

Compatibility: Nothing changes.

Issues

See #413

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). 604 passed, 14 failed, 76 skipped (Linux), after the rebase on main @ 615b2498. The same 14 fail on main on this PC (build-environment checks): test_bug_report_defaults, test_crt_options, test_dlss_feature_size, test_failed_compile_keeps_objects, test_guest_imported, test_linux_preflight, test_linux_update, test_make_game_cache, test_missing_nup, test_mods_size_table, test_pending_guest_import, test_run_all_changed, test_vk_occlusion_queries, test_walk_key.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Screenshots of the same spot, captioned like the Measurements columns, for a change that shows on screen.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths.

🤖 Generated with Claude Code

https://claude.ai/code/session_015KgSKmCc7pkXGyByWtmErh

**Type:** fix · **Risk:** medium · **Tested on:** Linux, Radeon 680M (RADV) · **Needs:** Windows, any GPU ## Why When you change **Button prompts** in the Insert menu while playing, many texts already on screen keep the old face until the next start. That includes the HUD's item button (R2/ZR under the item, and the R above it). New texts, such as an item's pop-up, do follow. The game lays these texts out once and never draws them through the hook that rewrites a text's button codes, so the change never reached them. See #413 (its "stays on the connected pad's face" may be this, seen after a change in the menu). ## How to reproduce **Seen on:** Linux, Radeon 680M (RADV); main @ 71b1edd8 **Settings and switches:** Button prompts = PlayStation 5 at start **Steps:** load a save with an item on ZR (here the slingshot), close the pause menu, then change Button prompts in the Insert menu to Xbox, Keyboard or Switch. **Expected:** the item's labels change to RB/RT, R/X or R/ZR. **Actual:** they stay R1/R2. With the keyboard face at start, they stay R/X under every face. ## What changed The text boxes seen with a button's code are now kept, and a change rewrites the ones still on screen and has the game lay them out and draw them again. Hint bars (the stick hints at the bottom of the screen, the ocarina's "Play a note" bar) are left as they are on main: laid out again on their own, the game draws them empty. - prompts: `remember_box` in `host/prompts.c` keeps each box the layout hook (`hos_prompts_text_layout`, f_8152aec0) sees with a button's code. Along with the box it keeps what says it's still that box: its class (+0), its status's address (+8), its text's address (+0xf0), its length and a hash of the text. A box drawn through the draw hook every frame already follows a change, so the per-frame hook doesn't keep anything. A box laid out again with no button code is dropped. The list holds up to 1024, and a full list replaces the box seen longest ago. - prompts: `boxes_follow`, called from `live_font` after the font is rewritten, rewrites each kept box that still matches all of those (`text_rewrite`, leaving the sticks' codes) and sets 0x20000 | 0x100000 in its status. Anything else (a box that's gone, another object, another text) is dropped and never written. - prompts: a box holding only stick icons ("Move", "Change View") isn't kept. Rewritten to the game's own stick icons at their `STICK_GAME` codes, the game laid them out again and drew them empty, under every face. The font does have those glyphs (checked: U+F8D6 maps to the same glyph as U+E05E), and marking 0x20000 alone did the same. In a box that mixes a button with a stick, the sweep leaves the stick's code as it is. `stick_of()` names a stick's code, including the key slot a stick icon gets on the keyboard face, for `text_code`, `text_rewrite` and `has_button_code`. `box_text` and `code_at` read a text's codes for all of them. - prompts: `in_bar()` leaves out a box in a bar of hints, one whose parent pane (+0xe0) has its word at +0x10 set. With the ocarina out, a change blanked every icon of its hint bar, as it had the stick hints, whichever status bits were marked (0x20000, 0x100000 or both). Rewriting without marking didn't redraw anything. The HUD item button's parent has that word clear, and the HUD needs the layout to show its new icon. Such a box keeps the face it had until the bar is shown again: the ocarina taken out after a change shows the new face. The parent words were read from the three parents involved (both hint bars, the HUD slot), so the rule rests on that sample. - prompts: `mark_box` sets the bits atomically, since the sweep runs beside the game's threads. - test: `tests/test_prompt_boxes_follow.py` (game-free), and `tests/test_prompt_font_bind.py` now also cuts `stick_of`. ## Measurements **Verdict:** it passes. The HUD's item button follows each change (PS5 → Xbox → keyboard → Switch). The stick hints and the ocarina's hint bar keep their icons, as on main. There's nothing to measure for speed: the sweep runs once per change, over at most 1024 boxes. The numbers still hold on main @ 615b2498: none of the 13 commits main gained since 71b1edd8 touches the prompt code (`host/prompts.c`, `host/pad_sdl.c`, `nx2/oot_patches.py`, `nx2/prompt_assets.py`: no diff), and the final in-game check ran on this PR's last commit. Hardware: Linux (CachyOS 7.3.4), Radeon 680M (RADV), Ryzen 9 6900HX Scene: Kokiri Forest, Link's house, 1280x720 window Method: a save made with the cheat menu (slingshot on ZR); Button prompts set to PS5 at start, then changed live through the control bridge to each face; screenshots 2 s and 12 s after each change; the log lines below. How to reproduce: `HOS_OOT_CHEATS=1`; set Button prompts at start to PS5, equip the slingshot, then change Button prompts in the Insert menu. | | Before: main @ 71b1edd8 | After: this PR @ 26c066f6 | |---|---|---| | HUD item labels after PS5 → Xbox | R1 / R2 (unchanged) | RB / RT | | … → Keyboard | R1 / R2 | R / X | | … → Switch | R1 / R2 | R / ZR | | Stick hints ("Move", "Change View") after a change | keep the start's icon | keep the start's icon (unchanged; see Risks) | | Ocarina out (d-pad left), then a change | keeps the icons it opened with | keeps the icons it opened with (unchanged); taken out again, the new face | ``` prompts: now the xbox icons in texts, 16 buttons on these controls prompts: 7 texts on screen laid out again with the new icons prompts: now the keyboard icons in texts, 16 buttons on these controls prompts: 7 texts on screen laid out again with the new icons prompts: now the switch icons in texts, 16 buttons on these controls prompts: 7 texts on screen laid out again with the new icons ``` ### Flags and settings None. ## Testing **Tested:** - Game-free: `tests/test_prompt_boxes_follow.py` passes here and fails on main ("host/prompts.c keeps no text boxes for a change to rewrite"). The other `tests/test_prompt*.py` checks and `test_utf8_paths.py` pass. `host/prompts.c` compiles cleanly with clang (Linux) and llvm-mingw (Windows). - In game, Linux, Radeon 680M: as in Measurements; the screenshots are in the comment with the before/after image. **Not tested:** Windows; other languages and resolutions. **Must be tested:** - Windows, any GPU: the same steps as How to reproduce, expecting the item's labels to follow each face (by hand: the item slot at the top right). ## Risks **What could break:** texts on screen at a change get rewritten from outside the game's own text path, on the thread that applies the change (the controller poll), while the game may be drawing them. The 3 bytes of a code aren't written atomically, so a frame could draw a half-written code once. If the game's own update of a status word overwrites the bits set here, that box keeps its old face until it's next laid out. A box is written only while its class, status, text address, length and text hash all match, so a freed box would need all five to match before anything is written. The sweep holds its lock while it runs, so a layout at that moment waits; it runs once per change, over at most 1024 boxes. Still open, as on main: hint bars keep the face they were shown with until they're shown again. That means the stick hints keep their start face (for example L/R on the keyboard face rather than WASD), and the ocarina's bar keeps its face while it stays out. The bar rule reads a parent's word that was only observed on three parents: a bar it misses could still be drawn empty at a change (until it's shown again), and a non-bar box it catches keeps its old face, as on main. **Turning it off:** revert the commit. **Compatibility:** Nothing changes. ## Issues See #413 ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). 604 passed, 14 failed, 76 skipped (Linux), after the rebase on main @ 615b2498. The same 14 fail on main on this PC (build-environment checks): test_bug_report_defaults, test_crt_options, test_dlss_feature_size, test_failed_compile_keeps_objects, test_guest_imported, test_linux_preflight, test_linux_update, test_make_game_cache, test_missing_nup, test_mods_size_table, test_pending_guest_import, test_run_all_changed, test_vk_occlusion_queries, test_walk_key. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Screenshots of the same spot, captioned like the Measurements columns, for a change that shows on screen. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015KgSKmCc7pkXGyByWtmErh
fix(prompts): the texts already on screen follow a new face at once (the HUD's item button, the stick hints)
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
PR description / Description follows the template (pull_request_target) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Third-party parts / As their notes say (pull_request) Successful in 13s
Website / Website on Cloudflare (pull_request_target) Has been skipped
b03111bb64
The game lays many text boxes out once and never draws them through
f_8152b670 again: the HUD's item button (R2 or ZR under the item) and the R
above it, the stick hints at the bottom. The hooks that rewrite a box's button
codes never saw them after a change, so a new face or new controls showed there
only at the next start. Each box laid out or drawn with a button's code is now
kept (remember_box, with its class and its text's place), and a change rewrites
the ones still there and marks them to be laid out and drawn anew
(boxes_follow, from live_font); one no longer the same object is let go
untouched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKmCc7pkXGyByWtmErh
Author
Member

Tested in game: Linux, Radeon 680M RADV, Kokiri Forest: Button prompts PS5 at start, changed live to Xbox/Keyboard/Switch; the HUD item labels follow each change; the stick hints lose their icon (open, being fixed)

Tested in game: Linux, Radeon 680M RADV, Kokiri Forest: Button prompts PS5 at start, changed live to Xbox/Keyboard/Switch; the HUD item labels follow each change; the stick hints lose their icon (open, being fixed)
Collaborator

Possibly related, for context:

  • PR #1126 fix(prompts): the layouts' copy is found once the game has unpacked it, so the Talk ring follows a new face at once — Overlapping live prompt updates in host/prompts.c.
Possibly related, for context: - PR #1126 fix(prompts): the layouts' copy is found once the game has unpacked it, so the Talk ring follows a new face at once — Overlapping live prompt updates in host/prompts.c.
fix(prompts): the stick hints are not rewritten at a change, as the game then draws them empty
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 12s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Third-party parts / As their notes say (pull_request) Successful in 18s
PR description / Description follows the template (pull_request_target) Successful in 4s
29decdac1e
Rewritten to the game's own stick icons at their STICK_GAME codes, the boxes
with a stick's icon alone (Move and Change View at the bottom of the screen)
were laid out again and drawn empty, under every face, though the font has
those glyphs (the same as U+E05E/E05F) and marking 0x20000 alone did the same.
Such a box is no longer kept for the sweep: it keeps the face it had, as on
main. stick_of() names a stick's code for text_code and has_button_code alike.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKmCc7pkXGyByWtmErh
Author
Member

Pushed 29decdac: boxes holding only stick icons are no longer swept. Rewritten to STICK_GAME codes, the game drew the Move and Change View hints empty under every face; marking 0x20000 alone did the same, and the font has the glyphs. They now keep the start's icon as on main. Re-run in game (Linux, Radeon 680M): the item labels follow PS5 -> Xbox -> Keyboard -> Switch, and the stick hints keep their icon.

Pushed 29decdac: boxes holding only stick icons are no longer swept. Rewritten to STICK_GAME codes, the game drew the Move and Change View hints empty under every face; marking 0x20000 alone did the same, and the font has the glyphs. They now keep the start's icon as on main. Re-run in game (Linux, Radeon 680M): the item labels follow PS5 -> Xbox -> Keyboard -> Switch, and the stick hints keep their icon.
Author
Member

Screenshots (Linux, Radeon 680M, Kokiri Forest, 1280x720), the HUD's item slot and the stick hints. Top: main @ 71b1edd8, PS5 at start, then a live change to Xbox (unchanged R1/R2). Bottom: this PR @ 29decdac, PS5 at start, then live Xbox (RB/RT), Keyboard (R/X), Switch (R/ZR); the stick hints keep their icon.

pr-hud-before-after.png

Screenshots (Linux, Radeon 680M, Kokiri Forest, 1280x720), the HUD's item slot and the stick hints. Top: main @ 71b1edd8, PS5 at start, then a live change to Xbox (unchanged R1/R2). Bottom: this PR @ 29decdac, PS5 at start, then live Xbox (RB/RT), Keyboard (R/X), Switch (R/ZR); the stick hints keep their icon. ![pr-hud-before-after.png](https://git.magicbean.dev/attachments/8fdb9372-0ef9-493f-a4ea-57209371bbc2)
Author
Member

Ran tests/run_all.py on Linux: 589 passed, 15 failed, 74 skipped. The same 15 fail on main @ 71b1edd8 on this PC, and they're named in the checklist.

Ran tests/run_all.py on Linux: 589 passed, 15 failed, 74 skipped. The same 15 fail on main @ 71b1edd8 on this PC, and they're named in the checklist.
fix(prompts): review: kept boxes checked whole before a write, stick codes left in any box, kept from the layout hook
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
PR description / Description follows the template (pull_request_target) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 17s
Third-party parts / As their notes say (pull_request) Successful in 19s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by gab9281 (reviewed)
beanstalk/windows 0/1 pass, 1 running, 0 queued
1b1d41daa2
From /code-review high on the sweep of the boxes kept:
- a box is written only while its class, status, text place, length and a
  hash of its text are as last seen (a freed box whose words still matched
  could have had another object's text rewritten);
- the sweep leaves the sticks' codes in every box (a box with a button and a
  stick's icon would have drawn the stick empty), and stick_of knows the key
  slot codes given out for a stick's icon on the keyboard face;
- boxes are kept from the layout hook alone (the draw hook runs each frame,
  and a box it draws follows a change already), a box laid out again with no
  button code is let go, and a full list replaces the box seen longest ago;
- box_text and code_at read a text's codes for text_rewrite and
  has_button_code alike.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKmCc7pkXGyByWtmErh
Author
Member

Pushed 1b1d41da with the /code-review high fixes. A box is written only while its class, status, text address, length and text hash match. The sweep leaves stick codes in every box, and stick_of knows the key slots. Boxes are kept from the layout hook only, a box re-laid with no button code is dropped, and a full list evicts the box seen longest ago. A shared text-code reader replaces the duplicated scan. Not changed, now under Risks: the write from the controller thread and the lock held during the sweep. Re-run in game (Linux, Radeon 680M, PS5 -> Xbox -> Keyboard -> Switch): same result as the screenshots above. The prompt checks pass.

Pushed 1b1d41da with the /code-review high fixes. A box is written only while its class, status, text address, length and text hash match. The sweep leaves stick codes in every box, and stick_of knows the key slots. Boxes are kept from the layout hook only, a box re-laid with no button code is dropped, and a full list evicts the box seen longest ago. A shared text-code reader replaces the duplicated scan. Not changed, now under Risks: the write from the controller thread and the lock held during the sweep. Re-run in game (Linux, Radeon 680M, PS5 -> Xbox -> Keyboard -> Switch): same result as the screenshots above. The prompt checks pass.
Author
Member

@Beanstalk windows: start with Button prompts set to PlayStation 5 and a save with an item on ZR (the slingshot) in Kokiri Forest. In the Insert menu, change Button prompts to Xbox, then Keyboard, then Switch, closing the menu after each. Expected: the HUD item slot (top right) shows R1/R2, then RB/RT, then R/X, then R/ZR, and the Move/Change View hints at the bottom keep an icon. Also look for any crash or a log line starting "prompts:" with an error after a change.

@Beanstalk windows: start with Button prompts set to PlayStation 5 and a save with an item on ZR (the slingshot) in Kokiri Forest. In the Insert menu, change Button prompts to Xbox, then Keyboard, then Switch, closing the menu after each. Expected: the HUD item slot (top right) shows R1/R2, then RB/RT, then R/X, then R/ZR, and the Move/Change View hints at the bottom keep an icon. Also look for any crash or a log line starting "prompts:" with an error after a change.
Member
Beanstalk test farm · an earlier run: commit 1b1d41d (the newer results are in a comment below)

Commit 1b1d41d · tier reviewed · approved by gab9281 · dashboard

What will be tested · AI plan (gpt-6.1-terra)

On Windows, this plan compares the PlayStation 5 prompt display in Kokiri Forest against main and checks for crashes and prompt errors, taking about 12 minutes per tester. The available save does not include an equipped slingshot, and the plan cannot change Button prompts live because that setting is restart-only in the farm schema. Consequently, this is a smoke test only: it cannot verify the requested face changes or the equipped-item labels. A crash, prompt error, or screenshot difference fails the plan.

  • Where: windows (1 report).
  • kokiri-ps5-prompts: from the repository's save kokiri-start (settings button_prompts=4), then teleport to Kokiri Forest, take the picture ps5-hud to compare with main; 1 run on each side.
  • Measured: crashes, the game's log.
  • The PR fails if: it crashes; or a picture differs from main by more than 0%; or forbidden log lines is above 0.
  • Time: about 11 min of game runs per tester (2 game starts), plus the two builds.

Started.

Target Reports Crash Frame p99 (ms) vs main VRAM peak (MB) vs main Result
windows 0/1 — — — running
<!-- beanstalk:previous --> <details><summary>Beanstalk test farm · an earlier run: commit <code>1b1d41d</code> (the newer results are in a comment below)</summary> Commit `1b1d41d` · tier **reviewed** · approved by gab9281 · [dashboard](https://beanstalk.magicbean.dev/prs/1184) **What will be tested** · AI plan (`gpt-6.1-terra`) On Windows, this plan compares the PlayStation 5 prompt display in Kokiri Forest against main and checks for crashes and prompt errors, taking about 12 minutes per tester. The available save does not include an equipped slingshot, and the plan cannot change Button prompts live because that setting is restart-only in the farm schema. Consequently, this is a smoke test only: it cannot verify the requested face changes or the equipped-item labels. A crash, prompt error, or screenshot difference fails the plan. - **Where:** windows (1 report). - **kokiri-ps5-prompts:** from the repository's save `kokiri-start` (settings button_prompts=4), then teleport to Kokiri Forest, take the picture ps5-hud to compare with main; 1 run on each side. - **Measured:** crashes, the game's log. - **The PR fails if:** it crashes; or a picture differs from main by more than 0%; or forbidden log lines is above 0. - **Time:** about 11 min of game runs per tester (2 game starts), plus the two builds. Started. | Target | Reports | Crash | Frame p99 (ms) vs main | VRAM peak (MB) vs main | Result | | --- | --- | --- | --- | --- | --- | | windows | 0/1 | — | — | — | running | </details>
gab9281 force-pushed fix/prompts-hud-texts-live from 1b1d41daa2
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
PR description / Description follows the template (pull_request_target) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 17s
Third-party parts / As their notes say (pull_request) Successful in 19s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by gab9281 (reviewed)
beanstalk/windows 0/1 pass, 1 running, 0 queued
to 26c066f680
Some checks are pending
beanstalk/approval not approved yet
PR description / Description follows the template (pull_request_target) Successful in 4s
2026-11-16 18:47:07 +00:00
Compare
Author
Member

Pushed 26c066f6, rebased on main @ 615b2498. Fourth commit: with the ocarina out (d-pad left), a change blanked every icon of its Play a note bar. That was this PR's own sweep: with the sweep switched off locally, the icons stayed. A box in a bar of hints (its parent's word at +0x10 set) is drawn empty when laid out again on its own, whichever bits are marked, while the HUD needs the layout. So such boxes are no longer kept. Checked in game on a clean build (Linux, Radeon 680M): the HUD follows PS5 -> Xbox -> Switch, and the stick hints and the ocarina bar keep their icons. run_all: 604 passed, 14 failed (all also fail on main).

Pushed 26c066f6, rebased on main @ 615b2498. Fourth commit: with the ocarina out (d-pad left), a change blanked every icon of its Play a note bar. That was this PR's own sweep: with the sweep switched off locally, the icons stayed. A box in a bar of hints (its parent's word at +0x10 set) is drawn empty when laid out again on its own, whichever bits are marked, while the HUD needs the layout. So such boxes are no longer kept. Checked in game on a clean build (Linux, Radeon 680M): the HUD follows PS5 -> Xbox -> Switch, and the stick hints and the ocarina bar keep their icons. run_all: 604 passed, 14 failed (all also fail on main).
Member

Beanstalk test farm

Commit 26c066f · tier untrusted · approved by nobody yet · dashboard

A member of BigBeans can review this commit and comment @Beanstalk to test it.

<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `26c066f` · tier **untrusted** · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/1184) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
Author
Member

This PR @ 26c066f6 (clean build, Linux, Radeon 680M, PS5 at start). Top: the HUD item slot at start, after a live change to Xbox, then to Switch (R1/R2 -> RB/RT -> R/ZR). Below: the stick hints after the Xbox change, then the ocarina's hint bar opened under Xbox and after a live change to Switch. The icons are kept, not blanked; the bar shows Switch the next time the ocarina is taken out.

cmp.png

This PR @ 26c066f6 (clean build, Linux, Radeon 680M, PS5 at start). Top: the HUD item slot at start, after a live change to Xbox, then to Switch (R1/R2 -> RB/RT -> R/ZR). Below: the stick hints after the Xbox change, then the ocarina's hint bar opened under Xbox and after a live change to Switch. The icons are kept, not blanked; the bar shows Switch the next time the ocarina is taken out. ![cmp.png](https://git.magicbean.dev/attachments/97a0b463-cb36-451c-bb73-f6ca8044cc8b)
cmp.png
356 KiB
gab9281 changed title from WIP: fix(prompts): texts already on screen follow a new face at once (the HUD's item button) to fix(prompts): texts already on screen follow a new face at once (the HUD's item button) 2026-11-16 18:47:25 +00:00
Author
Member

Measurements: added why the numbers still hold after the rebase (main's 13 new commits don't touch the prompt code).

Measurements: added why the numbers still hold after the rebase (main's 13 new commits don't touch the prompt code).
Author
Member

Languages and resolutions, this PR @ 26c066f6 with #1125 and #1126 (clean build, Linux, Radeon 680M, PS5 at start, the saved slingshot on ZR): de at 3840x2160, ja at 2560x1440, ko at 1280x720, zh-Hant at 1920x1080. Each starts with prompts: ps5 icons. Each row: the HUD item slot at start, after a live change to Xbox, then to Switch (R1/R2 -> RB/RT -> R/ZR); the stick hints after the Xbox change; the ocarina bar opened under Xbox, then after the live change to Switch (icons kept). Traditional Chinese, whose own fonts have Switch icons at the same code points, shows the face chosen.

matrix-sheet.png

Languages and resolutions, this PR @ 26c066f6 with #1125 and #1126 (clean build, Linux, Radeon 680M, PS5 at start, the saved slingshot on ZR): de at 3840x2160, ja at 2560x1440, ko at 1280x720, zh-Hant at 1920x1080. Each starts with `prompts: ps5 icons`. Each row: the HUD item slot at start, after a live change to Xbox, then to Switch (R1/R2 -> RB/RT -> R/ZR); the stick hints after the Xbox change; the ocarina bar opened under Xbox, then after the live change to Switch (icons kept). Traditional Chinese, whose own fonts have Switch icons at the same code points, shows the face chosen. ![matrix-sheet.png](https://git.magicbean.dev/attachments/4988f713-96d0-4ded-ac3f-04cc7e0dd19f)
Some checks are pending
beanstalk/approval not approved yet
PR description / Description follows the template (pull_request_target) Successful in 4s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/prompts-hud-texts-live:gab9281-fix/prompts-hud-texts-live'
git switch 'gab9281-fix/prompts-hud-texts-live'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1184
No description provided.