mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-30 00:05:59 +01:00
renderer: disable init anim on disabled animations
This commit is contained in:
parent
375e8385ee
commit
1a7fb1572a
1 changed files with 8 additions and 2 deletions
|
@ -825,6 +825,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
||||||
static auto* const PVFR = &g_pConfigManager->getConfigValuePtr("misc:vfr")->intValue;
|
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 PZOOMFACTOR = &g_pConfigManager->getConfigValuePtr("misc:cursor_zoom_factor")->floatValue;
|
||||||
static auto* const PRENDERTEX = &g_pConfigManager->getConfigValuePtr("misc:disable_hyprland_logo")->intValue;
|
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
|
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
|
if (m_tRenderTimer.getSeconds() < 1.5f && firstLaunchAnimActive) { // TODO: make the animation system more damage-flexible so that this can be migrated to there
|
||||||
|
if (!*PANIMENABLED) {
|
||||||
|
zoomInFactorFirstLaunch = 1.f;
|
||||||
|
firstLaunchAnimActive = false;
|
||||||
|
} else {
|
||||||
zoomInFactorFirstLaunch = 2.f - g_pAnimationManager->getBezier("default")->getYForPoint(m_tRenderTimer.getSeconds() / 1.5);
|
zoomInFactorFirstLaunch = 2.f - g_pAnimationManager->getBezier("default")->getYForPoint(m_tRenderTimer.getSeconds() / 1.5);
|
||||||
damageMonitor(pMonitor);
|
damageMonitor(pMonitor);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
firstLaunchAnimActive = false;
|
firstLaunchAnimActive = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue