fix(macos): stop CPU spin when display sleeps with video paused
When the display/system sleeps with a video paused, the window server stops completing CAMetalLayer presents and mpv's MoltenVK swapchain wedges, pinning one core at 100% until the app exits. occlusionState does not reliably change on display sleep, so observe NSWorkspace screensDidSleep/ Wake to hide the metal layer (and drop the playback activity) while dark, restoring on wake with a forced redraw when paused to avoid a stale frame. Pairs with MPVKit v1.0.10, which gates libmpv presentation on the layer's hidden state (check_visible) so presents actually stop while hidden.
This commit is contained in:
@@ -891,7 +891,7 @@
|
||||
repositoryURL = "https://github.com/edde746/MPVKit";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 1.0.9;
|
||||
version = 1.0.10;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
Reference in New Issue
Block a user