Skip to content

Mario: draw the TICK row only on the clock's overlay - #127

Merged
BrianPugh merged 1 commit into
mainfrom
fix-tick-row-in-game-pause
Oct 28, 2026
Merged

BrianPugh merged 1 commit into
mainfrom
fix-tick-row-in-game-pause

Conversation

@BrianPugh

Copy link
Copy Markdown
Owner

A user reported a stray "TICK ON" row when pausing in games (on an amalgam, Mario side). Stock `settings_game_draw` has no tail call of its own for RESET GAME: it branches into `settings_clock_draw`'s last tail call (0x0800cffc → 0x0800ce9e), which the TICK setting redirected to `tick_draw`. So every in-game pause also drew the TICK row, below the in-game panel and outside its dirty rect, and it stayed on screen after the overlay closed.

`tick_draw` now skips the row unless `(gnw_mode & 0xc2) == 0x02`, the same test `ui_render_overlay` uses to pick `settings_clock_draw`.

Zelda isn't affected: in its ITCM code the only branch into the hooked tail of `settings_clock_draw` comes from inside that function, and both in-game draw functions end in their own tail calls.

Testing:

  • Reproduced in GWemu on the Mario build and the amalgam (SMB1 pause, frames through open/close). After the fix the clock overlay still shows TICK ON and the SMB1 pause shows only volume, brightness and RESET GAME, with nothing left behind.
  • `tests/` pass. `golden.json` is re-recorded with gcc 15.3.1 (the 15.2 toolchain is gone; `main`'s hashes are identical under 15.3). The fix changes all 10 Mario/amalgam configs and none of the 5 Zelda ones.

🤖 Generated with Claude Code

settings_game_draw branches into settings_clock_draw's last tail call to
draw RESET GAME, so tick_draw also drew the TICK row on the in-game pause
overlay, below that panel and outside its dirty rect, where it stayed after
the overlay closed. Skip it unless gnw_mode is the clock (the test
ui_render_overlay picks settings_clock_draw with).

golden.json is recorded with gcc 15.3.1 (15.2's toolchain is gone; main's
hashes are the same under both).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BrianPugh

Copy link
Copy Markdown
Owner Author

Checked on hardware (amalgam on a dev unit): the SMB1 pause overlay no longer shows the TICK row or leaves it behind, and the clock overlay's TICK ON row still works.

@BrianPugh
BrianPugh merged commit d3a94bf into main Oct 28, 2026
1 check passed
@BrianPugh
BrianPugh deleted the fix-tick-row-in-game-pause branch October 28, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant