ScreenCaptureKit is the new blessèd way to capture screen contents (instead of CGWindowListCreateImage) and includes some useful features like automatically handling image resizing on the gpu.
Unfortunately the only way to manifest an SCWindow is from an instance of SCShareableContent, which affects all of Switch's window list and content code. Also the API is async which is cool but means even more rearchitecting.
let content = try await SCShareableContent.excludingDesktopWindows(false, onscreenWindowsOnly: true)
ScreenCaptureKit is the new blessèd way to capture screen contents (instead of
CGWindowListCreateImage) and includes some useful features like automatically handling image resizing on the gpu.Unfortunately the only way to manifest an
SCWindowis from an instance ofSCShareableContent, which affects all of Switch's window list and content code. Also the API isasyncwhich is cool but means even more rearchitecting.