Skip to content

Show the overlays and shortcuts in one compact corner panel - #17

Merged
ly05010419 merged 2 commits into
ly05010419:mainfrom
joevans:compact-hud
Oct 19, 2026
Merged

ly05010419 merged 2 commits into
ly05010419:mainfrom
joevans:compact-hud

Conversation

@joevans

@joevans joevans commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #12 (English UI). This branch is built on it, so the first two commits here (2c47034, bbacef6) are #12's. Once #12 merges, only the last two remain.

What it changes

The in-game readings were spread out: FPS top-right, shader count bottom-left and CPU/GPU load bottom-right, each in its own box drawn into the picture. The shortcut reminder sat in a large box in the middle of the window. Now, by default, they share one small panel in the window's top-right corner:

  • The FPS, shader and load lines in a 10.5 pt monospaced font, green as before. The shader line still turns yellow for 3 s when something new was collected.
  • The shortcuts below them in 10 pt gray.
  • Key 1 still shows and hides everything together.

TOTK_HUD=corners restores the previous layout exactly. iOS is unchanged (hud_compact() defaults off there).

How

  • fps_overlay.c: fps_overlay_text() (the FPS line text, now shared by the raster path) and a small mutex-protected line store (hud_publish / hud_snapshot).
  • nvn_mtl.m: in compact mode, fps_overlay_prepare, shader_overlay_prepare and load_overlay_prepare publish their text and skip drawing into the picture. The texts, colours and enable switches (TOTK_FPS_OVERLAY, TOTK_SHADER_OVERLAY, TOTK_LOAD_OVERLAY) are unchanged.
  • frontend.m: TOTKShortcutHelp becomes the panel. It refreshes twice a second, sizes itself to its text and stays pinned to the top-right corner. In corners mode it is the original centred box.
  • README (EN/ZH): key 1 description.

Testing

  • M4 Pro, macOS 27.0, TOTK 1.0.0, with Support the macOS 27 address-space layout #11 and Compile warm-up shader libraries on all cores #13 merged locally: the panel shows the three lines and the shortcuts in the corner (checked by eye in the running game).
  • tests/fps_overlay probe passes (706 checks).
  • Not run: key 1 with the new panel (it uses the same hidden flag as before), and TOTK_HUD=corners in a live game. That path only adds the hud_compact() checks around the existing drawing code.

🤖 Generated with Claude Code

joevans and others added 2 commits October 18, 2026 14:09
The FPS, shader and load lines were drawn into three corners of the
picture and the shortcuts sat in a large box in the middle of the window.
By default they now share one small box in the window's top-right
corner: the three lines in a 10.5 pt monospaced font (the shader line
still turns yellow when something new was collected) above the
shortcuts in 10 pt. Key 1 still shows and hides everything.
TOTK_HUD=corners keeps the previous layout; iOS is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@ly05010419

Copy link
Copy Markdown
Owner

挺好

@ly05010419
ly05010419 merged commit 2d754d4 into ly05010419:main Oct 19, 2026
2 checks passed
tvc97 added a commit to tvc97/MacNativeGames that referenced this pull request Oct 19, 2026
…05010419#30)

Brings in upstream ly05010419#29 (bounded pipeline prediction without translation,
stale guesses reclaimed) and ly05010419#30 (in-game libraries and pipelines in the
background, plus the present residency and compile-options fixes).

Conflict resolution in nvn_mtl.m / hle_nvn.c: took the branch side,
re-applied what main has since ly05010419#29's base (ly05010419#13 warm_precompile, ly05010419#17
compact HUD), and kept main's prebuilt-library hit/miss diagnostic.
Our earlier prediction-table drain (pso_pend_drain into g_pso,
prog_get_cached, mtl_pp_stats and its log line) is replaced by ly05010419#29's
version. It no longer skips pso_user.tsv for drained pipelines.

Checked: make runtime-v143 (58 warnings, none new), 38 source tests,
probe-gfx pass, 3 empty-cache async boots without a GPU fault.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ly05010419 added a commit that referenced this pull request Oct 19, 2026
FPS, shader count, system load and the shortcut reminder now share one small box in
the window's top-right corner instead of being drawn into the picture; TOTK_HUD=corners
keeps the old layout and iOS is unchanged. Conflicts: frontend.m keeps the shortened
English interpolation line; the README keeps the Mac-only wording and the iOS touch
controls. The Command-Q probe gets stubs for hud_compact and hud_snapshot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AZC16EYkS2AmLMgumTJaXJ
ly05010419 added a commit that referenced this pull request Oct 19, 2026
GitHub's merge of PR #17; the same commits were already merged here (c5a12fb), so
the files do not change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AZC16EYkS2AmLMgumTJaXJ
@joevans
joevans deleted the compact-hud branch October 23, 2026 00:06
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.

2 participants