Skip to content

Heat and battery: a launcher toggle under Frame-rate counter - #1

Merged
Mars-Mah3r merged 1 commit into
ios-counter-heat-batteryfrom
ios-counter-heat-battery-toggle
Nov 13, 2026
Merged

Mars-Mah3r merged 1 commit into
ios-counter-heat-batteryfrom
ios-counter-heat-battery-toggle

Conversation

@Mars-Mah3r

@Mars-Mah3r Mars-Mah3r commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

For seedds/nxnative#2612: the counter's second line (heat, battery and time left) becomes the player's choice.

  • Launcher row Heat and battery (DM_SHOW_HEAT_BATTERY, iOS only, off by default) in dm/games/settings.tsv, right under Frame-rate counter, with needs=DM_SHOW_FPS=1, so it is drawn only while the counter is on.
  • Off: the counter is 60 fps, one line, as before iPhone frame-rate counter: heat and battery time left seedds/nxnative#2612. On: 60 fps · Busy over 75% · 1h20 left.
  • In-game menu: dm_setting_live takes it, so it switches at once. Turning it on starts the battery's measurement again (a measurement paused while the line was off is not resumed). Battery monitoring is turned on only when the line is.
  • Docs: docs/settings.md, docs/env_switches.tsv, docs/development.md. Tests: test_launcher_settings (iOS-only rows), test_player_env (kept in player builds).

Checked: compile_check.py (262 files, 0 failed); test_launcher_settings, test_player_env, test_settings, test_env_switches, test_docs pass.
Not checked: an iPhone.

… Heat and battery (DM_SHOW_HEAT_BATTERY, off by default) sits under Frame-rate counter and is drawn only while the counter is on (needs=DM_SHOW_FPS=1); without it the counter is the frame rate alone, as before. The in-game menu turns it on and off at once, and turning it on starts the battery's measurement again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added ios The iPhone and iPad app (dm/ios); on an issue, seen on one tools Tools and scripts (dm/tools, scripts) docs Documentation labels Nov 13, 2026
@Mars-Mah3r

Copy link
Copy Markdown
Owner Author

Folded into seedds#2612 directly (commit 749f27e pushed to ios-counter-heat-battery).

@Mars-Mah3r
Mars-Mah3r merged commit 749f27e into ios-counter-heat-battery Nov 13, 2026
6 of 8 checks passed
@Mars-Mah3r
Mars-Mah3r deleted the ios-counter-heat-battery-toggle branch November 13, 2026 23:58
Mars-Mah3r pushed a commit that referenced this pull request Nov 14, 2026
…eedds#1352)

Civilization VII 1.5.0.1 crashed on the Mac with CRASH sig=10 addr=0
pc=main+0x4e8a18 on its UI's second screen change: four hand-written
blocks in its main save x1-x17 in a 0x98-byte frame around svc #0x29, which
leaves sp 8 bytes off. Horizon allows that, Apple's kernel faults on it, as
with sub sp, sp, xN (site_sp_align). odd_sp_frames rounds both immediates of
such a pair up to 16 in place, only when the matching add follows within 64
instructions and nothing between them branches, writes or copies sp, uses
writeback or reaches past the frame.

On top of the PR: a frame of 0xff1-0xfff rounds to 0x1000, which the
unshifted 12-bit field cannot hold; written as before it became
sub sp, sp, #0, lsl seedds#12, a frame of nothing whose stores land on the
caller's stack. sp_adjust writes it as #1, lsl seedds#12, and test_sp_frame.py
covers it. The search now finds candidates by a one-byte regex like
exclusive_order_sites instead of walking every word: 2.71 s -> 0.08 s on
PRAGMATA's 134 MiB main.

Checked: test_sp_frame.py (8), the 16 test files that use patch_nso.py,
test_docs.py, lint_python.py --against origin/main (nothing new). The
search finds no odd sub/add sp, #imm word in 42 modules (main, rtld, sdk,
subsdk*) of 10 local games, so their rewrites are unchanged; the PR author
measured TotK and MGS4 byte-identical and Civilization VII 8 words changed,
14 minutes (49,800 frames) without a crash. regress.py not run: no local
game has such a frame. Supersedes PR seedds#1666 (every odd immediate rounded
unpaired, which would move incoming stack arguments).

Co-authored-by: Xiaofeng Han <15362031+xiaofeng-han@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation ios The iPhone and iPad app (dm/ios); on an issue, seen on one tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants