diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-02-08 15:15:37 +0000 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-02-08 15:18:54 +0000 |
| commit | 5eb98c0072b486adfde7e39892207770f6a4621a (patch) | |
| tree | 42f48eb7a17480e1652e6584175f2d220cff627b /src/events/Monitors.cpp | |
| parent | 863812a0979646fbc1a51b6593fa25fbad77a7be (diff) | |
improve VRR state checking with updates to mosthz
Diffstat (limited to 'src/events/Monitors.cpp')
| -rw-r--r-- | src/events/Monitors.cpp | 8 |
1 files 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) { |
