Fix screen capture on macOS 14+ (migrate to ScreenCaptureKit) - #37
Open
RobertmPevec wants to merge 1 commit into
Open
Fix screen capture on macOS 14+ (migrate to ScreenCaptureKit)#37RobertmPevec wants to merge 1 commit into
RobertmPevec wants to merge 1 commit into
Conversation
CGWindowListCreateImage was deprecated in macOS 14 (Sonoma) and returns nil/blank frames on current systems, so the classifier never receives an image and the app stops detecting the game state entirely. Changes: - Capture via SCScreenshotManager on macOS 14+, with a fallback to the old CGWindowListCreateImage API on macOS 11-13. - Match the game window tolerantly: the iPad-on-Mac build reports its window name as "AmongUs" (no space) rather than "Among Us". - Update @published state on the main thread, since capture now runs on a background Task. - Skip (continue) tiny helper windows instead of returning out of the scan.
RobertmPevec
force-pushed
the
modernize-screencapturekit
branch
from
June 29, 2026 08:10
1fe70c6 to
8a6611d
Compare
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.
On macOS 14 (Sonoma) and later, AmongKey no longer detects the game state — the status stays on "Nothing" and no controls work. The cause is CGWindowListCreateImage, which Apple deprecated in macOS 14; on current systems it returns nil/blank frames, so the CoreML classifier never receives an image and gamestate is never updated.
(Reproduced on an M2 Mac running macOS 14.5 with the current iPad-on-Mac build of Among Us.)