mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 21:13:48 -07:00
screencopy: Handle explicit sync failure (#10050)
This commit is contained in:
@@ -231,17 +231,18 @@ void CScreencopyFrame::copyDmabuf(std::function<void(bool)> callback) {
|
||||
|
||||
auto explicitOptions = g_pHyprRenderer->getExplicitSyncSettings(pMonitor->output);
|
||||
if (pMonitor->inTimeline && explicitOptions.explicitEnabled) {
|
||||
pMonitor->inTimeline->addWaiter(
|
||||
[callback]() {
|
||||
if (pMonitor->inTimeline->addWaiter(
|
||||
[callback, sync = pMonitor->eglSync]() {
|
||||
LOGM(TRACE, "Copied frame via dma with explicit sync");
|
||||
callback(true);
|
||||
},
|
||||
pMonitor->inTimelinePoint, 0);
|
||||
} else {
|
||||
pMonitor->inTimelinePoint, 0))
|
||||
return;
|
||||
// on explicit sync failure, fallthrough to immediate callback
|
||||
}
|
||||
LOGM(TRACE, "Copied frame via dma");
|
||||
callback(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool CScreencopyFrame::copyShm() {
|
||||
const auto PERM = g_pDynamicPermissionManager->clientPermissionMode(resource->client(), PERMISSION_TYPE_SCREENCOPY);
|
||||
|
Reference in New Issue
Block a user