From 40955d494146b7e193b65c9b8588b92faddeea6e Mon Sep 17 00:00:00 2001 From: UjinT34 Date: Thu, 11 Jul 2024 10:02:50 +0300 Subject: [PATCH] logging --- src/managers/PointerManager.cpp | 7 +++++-- src/render/Renderer.cpp | 4 +--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index 868376f1edc..f3feb9b42a1 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -395,9 +395,12 @@ SP CPointerManager::renderHWCursorBuffer(SPmakeEGLCurrent(); g_pHyprOpenGL->m_RenderData.pMonitor = state->monitor.get(); - const auto RBO = g_pHyprRenderer->getOrCreateRenderbuffer(buf, state->monitor->cursorSwapchain->currentOptions().format); - if (!RBO) + auto RBO = g_pHyprRenderer->getOrCreateRenderbuffer(buf, state->monitor->cursorSwapchain->currentOptions().format); + if (!RBO) { + Debug::log(TRACE, "Failed to create cursor RB with format {}: {} with mod {}", state->monitor->cursorSwapchain->currentOptions().format, buf->dmabuf().format, + buf->dmabuf().modifier); return nullptr; + } RBO->bind(); diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 197e6dd2521..a90b484233a 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1088,10 +1088,8 @@ bool CHyprRenderer::attemptDirectScanout(CMonitor* pMonitor) { if (!pMonitor->mirrors.empty() || pMonitor->isMirror() || m_bDirectScanoutBlocked) return false; // do not DS if this monitor is being mirrored. Will break the functionality. - if (g_pPointerManager->softwareLockedFor(pMonitor->self.lock())) { - Debug::log(TRACE, "Direct scanout failed: soft locked / HW cursors failed"); + if (g_pPointerManager->softwareLockedFor(pMonitor->self.lock())) return false; - } const auto PCANDIDATE = pMonitor->solitaryClient.lock();