summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-22 19:26:39 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-22 19:26:44 +0200
commit1a7fb1572ad5fc3bd95b0fa366faee68f8622acf (patch)
tree0e7aa12e68c5a308200947a6d9257c31ea2a9a93 /src/render/Renderer.cpp
parent375e8385eeabbcdae197e392394849e2cbb6f3ed (diff)
renderer: disable init anim on disabled animations
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 2fdb919d..bb1ab511 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -825,6 +825,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
static auto* const PVFR = &g_pConfigManager->getConfigValuePtr("misc:vfr")->intValue;
static auto* const PZOOMFACTOR = &g_pConfigManager->getConfigValuePtr("misc:cursor_zoom_factor")->floatValue;
static auto* const PRENDERTEX = &g_pConfigManager->getConfigValuePtr("misc:disable_hyprland_logo")->intValue;
+ static auto* const PANIMENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue;
static int damageBlinkCleanup = 0; // because double-buffered
@@ -842,8 +843,13 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
}
if (m_tRenderTimer.getSeconds() < 1.5f && firstLaunchAnimActive) { // TODO: make the animation system more damage-flexible so that this can be migrated to there
- zoomInFactorFirstLaunch = 2.f - g_pAnimationManager->getBezier("default")->getYForPoint(m_tRenderTimer.getSeconds() / 1.5);
- damageMonitor(pMonitor);
+ if (!*PANIMENABLED) {
+ zoomInFactorFirstLaunch = 1.f;
+ firstLaunchAnimActive = false;
+ } else {
+ zoomInFactorFirstLaunch = 2.f - g_pAnimationManager->getBezier("default")->getYForPoint(m_tRenderTimer.getSeconds() / 1.5);
+ damageMonitor(pMonitor);
+ }
} else {
firstLaunchAnimActive = false;
}