Repository navigation
Fix macOS HUD and dynamic-overlay-resize on Metal present thread - #88
Open
actuallyitsnathaniel wants to merge 2 commits into
Open
actuallyitsnathaniel wants to merge 2 commits into
actuallyitsnathaniel wants to merge 2 commits into
Conversation
actuallyitsnathaniel
requested review from
ThatGuyMcd and
swhitt
as code owners
November 2, 2026 21:48
7 tasks done
swhitt
reviewed
Nov 8, 2026
swhitt
left a comment
Collaborator
There was a problem hiding this comment.
runtime_ui.cpp is in DRIFTED_BASES on main now, so the base_sha256 bump fails the pinned-bytes check after a merge - just drop the manifest change.
The HUD extent move looks good.
| + // / resize off the main thread; a cached size plus async refresh leaves | ||
| + // the drawable and ImGui target stuck until something else refreshes. | ||
| + NSWindow *nsWindow = (__bridge NSWindow *)windowHandle; | ||
| + NSRect contentFrame = [[nsWindow contentView] frame]; |
Collaborator
There was a problem hiding this comment.
-[NSView frame] and backingScaleFactor are main-thread-only, which is why upstream caches here and refreshes on the main queue. Reading them from the present thread races live resize and Main Thread Checker will flag it. The UIKit half has the same problem, and iOS wasn't rebuilt.
Maybe refresh the cache synchronously on the main thread from the SDL resize event instead (updateWindowAttributesInternal(true)), and keep the present thread reading the cache?
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.
What
getWindowAttributesreturned a cache and only scheduled async refresh). Metal swapchain / ImGui targets could stick after drag-resize or fullscreen. New registered plume patch always reads live attributes.ui::drawnow callsset_viewport_extentevery present, before the overlay-closed early return.Pattern checklist
runtime-recomp/,modding/orscripts/(no newpatches/<name>/)*.patchfiles registered inpatches/manifest.json(patches/plume/0004-live-cocoa-window-attributes.patch)guest-hooks/hooks.toml; symbols only viasymbols/*.toml(n/a)netplay/legacy_identity.hppupdated (reviewed by both owners) if simulation, wire or owned-service behaviour changed (n/a)python3 scripts/check.py --suite guardpasses locally (present-thread Metal overlay resize check; HUD extent publish-before-early-return pipeline guard)build/dkr-runtime-macos). Host preset (RT64 off) 141/141. Windows / Linux / iOS / Android not rebuilt for this PR.Risk
Low. Plume change is Apple window-size reads only; HUD change only republishes Fit viewport aspect when size changes. Capsule
base_sha256forruntime_ui.cppupdated. Revert the commit to roll back.