Repository navigation
Performance overlay: thermal state field - #168
Merged
Merged
Conversation
## Problem A common report is "it starts at 40-45 FPS and sinks to 20 after a few minutes". That can be the game, the runtime, or iOS lowering clocks because the phone is hot, and the in-game overlay cannot tell them apart. The existing `[device-load]` line has the thermal state, but it is opt-in (`env.MADEIRA_DEVICE_STATS = 1`) and only in the log. ## Change - **In-game menu › Performance overlay** gets a fifth field, **Thermal** (off unless chosen, saved with the game like the other fields): Cool, Warm, Hot or Critical from `ProcessInfo.thermalState` (nominal, fair, serious, critical). iOS throttles from "serious" (Hot) on. - While the performance overlay is shown, a change of state is logged once: `[thermal] fair -> serious at 31 FPS`. - `DeviceLoadDiagnostics.thermalName` is factored out of the `[device-load]` line and shared. ## Evidence From the fork's overlay (iPhone 17 Pro Max, iOS 27), where the same readout has been on screen since late September: - Ghost of Tsushima, "40-45 then 20 FPS" report: the thermal state was already WARM at the start of the session, which kept the analysis from blaming the D3D12 runtime alone; the GPU time per frame rose with the game's particle count, a separate cause. - Sessions with async submission enabled showed no clear win while the phone was WARM from the start, so measurements are now repeated on a cool phone. ## Notes / risks - App only (`Library.swift`, plus the overlay fields in `docs/LIBRARY.md`). No new setting, no new Swift file. - The developer interface's FPS overlay is unchanged. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0189oLHghpaYKLk4f786a6bc Signed-off-by: bahacan16 <190844990+bahacan16@users.noreply.github.com>
willfaust
pushed a commit
that referenced
this pull request
Oct 4, 2026
Squashed from #168. Signed-off-by: bahacan16 <190844990+bahacan16@users.noreply.github.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.
Problem
A common report is "it starts at 40-45 FPS and sinks to 20 after a few minutes". That can be the game, the runtime, or iOS lowering clocks because the phone is hot, and the in-game overlay cannot tell them apart. The existing
[device-load]line has the thermal state, but it is opt-in (env.MADEIRA_DEVICE_STATS = 1) and only in the log.Change
ProcessInfo.thermalState(nominal, fair, serious, critical). iOS throttles from "serious" (Hot) on.[thermal] fair -> serious at 31 FPS.DeviceLoadDiagnostics.thermalNameis factored out of the[device-load]line and shared.Evidence
From the fork's overlay (iPhone 17 Pro Max, iOS 27), where the same readout has been on screen since late September:
Notes / risks
Library.swift, plus the overlay fields indocs/LIBRARY.md). No new setting, no new Swift file.🤖 Generated with Claude Code
Claude-Session: https://claude.ai/code/session_0189oLHghpaYKLk4f786a6bc