From 5eb98c0072b486adfde7e39892207770f6a4621a Mon Sep 17 00:00:00 2001 From: vaxerski Date: Wed, 8 Feb 2023 15:15:37 +0000 Subject: [PATCH] improve VRR state checking with updates to mosthz --- src/events/Monitors.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index cb5bf274..ee7734df 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -119,7 +119,6 @@ void Events::listener_monitorFrame(void* owner, void* data) { static auto* const PDEBUGOVERLAY = &g_pConfigManager->getConfigValuePtr("debug:overlay")->intValue; static auto* const PDAMAGETRACKINGMODE = &g_pConfigManager->getConfigValuePtr("debug:damage_tracking")->intValue; static auto* const PDAMAGEBLINK = &g_pConfigManager->getConfigValuePtr("debug:damage_blink")->intValue; - static auto* const PNOVFR = &g_pConfigManager->getConfigValuePtr("misc:no_vfr")->intValue; static auto* const PNODIRECTSCANOUT = &g_pConfigManager->getConfigValuePtr("misc:no_direct_scanout")->intValue; static int damageBlinkCleanup = 0; // because double-buffered @@ -149,7 +148,8 @@ void Events::listener_monitorFrame(void* owner, void* data) { // checks // if (PMONITOR->ID == g_pHyprRenderer->m_pMostHzMonitor->ID || - !*PNOVFR) { // unfortunately with VFR we don't have the guarantee mostHz is going to be updated all the time, so we have to ignore that + g_pHyprRenderer->m_pMostHzMonitor->output->adaptive_sync_status == + WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) { // unfortunately with VFR we don't have the guarantee mostHz is going to be updated all the time, so we have to ignore that g_pCompositor->sanityCheckWorkspaces(); g_pAnimationManager->tick(); @@ -204,7 +204,7 @@ void Events::listener_monitorFrame(void* owner, void* data) { pixman_region32_fini(&damage); wlr_output_rollback(PMONITOR->output); - if (*PDAMAGEBLINK || *PNOVFR) + if (*PDAMAGEBLINK || PMONITOR->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED) g_pCompositor->scheduleFrameForMonitor(PMONITOR); return; @@ -311,7 +311,7 @@ void Events::listener_monitorFrame(void* owner, void* data) { if (!wlr_output_commit(PMONITOR->output)) return; - if (*PDAMAGEBLINK || *PNOVFR) + if (*PDAMAGEBLINK || PMONITOR->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED) g_pCompositor->scheduleFrameForMonitor(PMONITOR); if (*PDEBUGOVERLAY == 1) {