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:
@@ -801,7 +801,7 @@
|
||||
repositoryURL = "https://github.com/edde746/MPVKit";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 1.0.9;
|
||||
version = 1.0.10;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "206ba4a9f8f8191f18cabfdc025bfa512729af58",
|
||||
"version" : "1.0.9"
|
||||
"revision" : "bdc3a651c17c01d3985828bdc07b716786992259",
|
||||
"version" : "1.0.10"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "206ba4a9f8f8191f18cabfdc025bfa512729af58",
|
||||
"version" : "1.0.9"
|
||||
"revision" : "bdc3a651c17c01d3985828bdc07b716786992259",
|
||||
"version" : "1.0.10"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user