From e95aa8ef267cfa9df4bba2d477e6bda89bfda8f5 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 31 Jul 2022 16:54:36 +0200 Subject: [PATCH] minor fixes to render loop --- src/events/Monitors.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 770f42b0..b8b5859e 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -98,6 +98,9 @@ void Events::listener_monitorFrame(void* owner, void* data) { static int damageBlinkCleanup = 0; // because double-buffered + if (!*PDAMAGEBLINK) + damageBlinkCleanup = 0; + if (*PDEBUGOVERLAY == 1) { startRender = std::chrono::high_resolution_clock::now(); g_pDebugOverlay->frameData(PMONITOR); @@ -112,6 +115,9 @@ void Events::listener_monitorFrame(void* owner, void* data) { Debug::log(LOG, "NoFrameSchedule hit for %s.", PMONITOR->szName.c_str()); } g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID); + + if (PMONITOR->framesToSkip > 10) + PMONITOR->framesToSkip = 0; return; } @@ -189,8 +195,12 @@ void Events::listener_monitorFrame(void* owner, void* data) { } } - if (PMONITOR->forceFullFrames > 0) + if (PMONITOR->forceFullFrames > 0) { PMONITOR->forceFullFrames -= 1; + if (PMONITOR->forceFullFrames > 10) + PMONITOR->forceFullFrames = 0; + } + // TODO: this is getting called with extents being 0,0,0,0 should it be? // potentially can save on resources.