Skip to content

Fix screen capture on macOS 14+ (migrate to ScreenCaptureKit) - #37

Open
RobertmPevec wants to merge 1 commit into
andresavic:mainfrom
RobertmPevec:modernize-screencapturekit
Open

Fix screen capture on macOS 14+ (migrate to ScreenCaptureKit)#37
RobertmPevec wants to merge 1 commit into
andresavic:mainfrom
RobertmPevec:modernize-screencapturekit

Conversation

@RobertmPevec

@RobertmPevec RobertmPevec commented Jun 29, 2026

Copy link
Copy Markdown

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.)

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
RobertmPevec force-pushed the modernize-screencapturekit branch from 1fe70c6 to 8a6611d Compare June 29, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant