Repository navigation
iPhone frame-rate counter: heat and battery time left - #2612
Open
Mars-Mah3r wants to merge 4 commits into
Open
Mars-Mah3r wants to merge 4 commits into
Mars-Mah3r wants to merge 4 commits into
Conversation
…he play time it leaves: "60 fps · Busy" over "75% · 1h20 left". The heat is NSProcessInfo's thermal state named for what it means (nominal, fair, serious, critical → Normal, Busy, Throttling, Overheat); the percentage comes from IOKit's power sources in 1 % steps, as the status bar shows it, or from UIDevice's 5 % steps when those are refused; the time is measured from the first step down to the latest, again after charging or the background. The label's timer runs in the common run loop modes, so it keeps updating while a touch is tracked (replaces PR seedds#1976) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 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>
This was referenced Nov 13, 2026
… DM_SHOW_HEAT_BATTERY and main's DM_SIX_DELAY Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A shorter redo of #1976. The counter reads:
NSProcessInfo.thermalStatewith plain names: nominal → Normal, fair → Busy, serious → Throttling, critical → Overheat.dlsym, since they are in the iOS runtime but not its SDK). If the sandbox refuses them it usesUIDevice.batteryLevel, which moves in 5 % steps on current iOS. The log lineframe-rate counter on (battery in … steps)says which one is in use.…until then, andchargingwhile plugged in. Charging, a level that goes up, or time in the background starts the measurement again.DM_SHOW_HEAT_BATTERY, off by default), right under Frame-rate counter and drawn only while it is on. Off, the counter is60 fpsalone, as before. The in-game menu switches it at once.Checked:
compile_check.py(262 files, 0 failed);test_launcher_settings,test_player_env,test_settings,test_env_switches,test_docs.Not checked: an iPhone. Still to find out on a phone: whether IOKit's power sources answer inside the app sandbox.