mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 22:26:00 +01:00
improve VRR state checking with updates to mosthz
This commit is contained in:
parent
863812a097
commit
5eb98c0072
1 changed files with 4 additions and 4 deletions
|
@ -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 PDEBUGOVERLAY = &g_pConfigManager->getConfigValuePtr("debug:overlay")->intValue;
|
||||||
static auto* const PDAMAGETRACKINGMODE = &g_pConfigManager->getConfigValuePtr("debug:damage_tracking")->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 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 auto* const PNODIRECTSCANOUT = &g_pConfigManager->getConfigValuePtr("misc:no_direct_scanout")->intValue;
|
||||||
|
|
||||||
static int damageBlinkCleanup = 0; // because double-buffered
|
static int damageBlinkCleanup = 0; // because double-buffered
|
||||||
|
@ -149,7 +148,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
||||||
|
|
||||||
// checks //
|
// checks //
|
||||||
if (PMONITOR->ID == g_pHyprRenderer->m_pMostHzMonitor->ID ||
|
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_pCompositor->sanityCheckWorkspaces();
|
||||||
g_pAnimationManager->tick();
|
g_pAnimationManager->tick();
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
||||||
pixman_region32_fini(&damage);
|
pixman_region32_fini(&damage);
|
||||||
wlr_output_rollback(PMONITOR->output);
|
wlr_output_rollback(PMONITOR->output);
|
||||||
|
|
||||||
if (*PDAMAGEBLINK || *PNOVFR)
|
if (*PDAMAGEBLINK || PMONITOR->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED)
|
||||||
g_pCompositor->scheduleFrameForMonitor(PMONITOR);
|
g_pCompositor->scheduleFrameForMonitor(PMONITOR);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -311,7 +311,7 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
||||||
if (!wlr_output_commit(PMONITOR->output))
|
if (!wlr_output_commit(PMONITOR->output))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (*PDAMAGEBLINK || *PNOVFR)
|
if (*PDAMAGEBLINK || PMONITOR->output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED)
|
||||||
g_pCompositor->scheduleFrameForMonitor(PMONITOR);
|
g_pCompositor->scheduleFrameForMonitor(PMONITOR);
|
||||||
|
|
||||||
if (*PDEBUGOVERLAY == 1) {
|
if (*PDEBUGOVERLAY == 1) {
|
||||||
|
|
Loading…
Reference in a new issue