diff options
author | UjinT34 <[email protected]> | 2024-10-12 03:29:51 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-12 01:29:51 +0100 |
commit | ee8116ac5dc412dce924a0163074ce7988dd0cfc (patch) | |
tree | d7c4785660a0d9112e57f20780d60e7542934117 /src/helpers/Monitor.cpp | |
parent | f5db4839730643169b7e8b7fb6ae2fbb8743ebe9 (diff) | |
download | Hyprland-ee8116ac5dc412dce924a0163074ce7988dd0cfc.tar.gz Hyprland-ee8116ac5dc412dce924a0163074ce7988dd0cfc.zip |
input: Fix VRR for constrained cursors (#6877)
Diffstat (limited to 'src/helpers/Monitor.cpp')
-rw-r--r-- | src/helpers/Monitor.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index f3e7de4e..091745df 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -16,6 +16,7 @@ #include "../protocols/core/Compositor.hpp" #include "sync/SyncTimeline.hpp" #include <aquamarine/output/Output.hpp> +#include "debug/Log.hpp" #include <hyprutils/string/String.hpp> #include <hyprutils/utils/ScopeGuard.hpp> using namespace Hyprutils::String; @@ -384,7 +385,7 @@ bool CMonitor::shouldSkipScheduleFrameOnMouseEvent() { *PNOBREAK && output->state->state().adaptiveSync && activeWorkspace && activeWorkspace->m_bHasFullscreenWindow && activeWorkspace->m_efFullscreenMode == FSMODE_FULLSCREEN; // keep requested minimum refresh rate - if (shouldSkip && *PMINRR && lastPresentationTimer.getMillis() > 1000 / *PMINRR) { + if (shouldSkip && *PMINRR && lastPresentationTimer.getMillis() > 1000.0f / *PMINRR) { // damage whole screen because some previous cursor box damages were skipped damage.damageEntire(); return false; @@ -933,6 +934,11 @@ bool CMonitor::attemptDirectScanout() { return true; } +void CMonitor::debugLastPresentation(const std::string& message) { + Debug::log(TRACE, "{} (last presentation {} - {} fps)", message, lastPresentationTimer.getMillis(), + lastPresentationTimer.getMillis() > 0 ? 1000.0f / lastPresentationTimer.getMillis() : 0.0f); +} + CMonitorState::CMonitorState(CMonitor* owner) { m_pOwner = owner; } |