From 206360177fcae23436928542ed860c854b985db4 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 4 Nov 2022 15:56:31 +0000 Subject: Multiple animation optimization and xwayland wine fixes --- src/helpers/AnimatedVariable.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/helpers/AnimatedVariable.cpp') diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp index 573844aa..c4a1713d 100644 --- a/src/helpers/AnimatedVariable.cpp +++ b/src/helpers/AnimatedVariable.cpp @@ -12,8 +12,6 @@ void CAnimatedVariable::create(ANIMATEDVARTYPE type, SAnimationPropertyConfig* p m_pConfig = pAnimConfig; m_pWindow = pWindow; - g_pAnimationManager->m_lAnimatedVariables.push_back(this); - m_bDummy = false; } @@ -58,6 +56,10 @@ void CAnimatedVariable::unregister() { g_pAnimationManager->m_lAnimatedVariables.remove(this); } +void CAnimatedVariable::registerVar() { + g_pAnimationManager->m_lAnimatedVariables.push_back(this); +} + int CAnimatedVariable::getDurationLeftMs() { return std::max((int)(m_pConfig->pValues->internalSpeed * 100) - (int)std::chrono::duration_cast(std::chrono::system_clock::now() - animationBegin).count(), 0); } -- cgit v1.2.3