AnimationController: fixed restore of last animation

This commit is contained in:
Thomas Kolb 2020-11-30 20:46:51 +01:00
parent 2b72d6c95b
commit 76354fa4bd
2 changed files with 3 additions and 1 deletions

View file

@ -52,7 +52,7 @@ class AnimationController
return !m_animation || (m_animation->finished() && !m_nextAnimation); return !m_animation || (m_animation->finished() && !m_nextAnimation);
} }
uint32_t currentFrame(void) { return m_frame; } uint64_t currentFrame(void) { return m_frame; }
AnimationInitiator animationInitiator(void) { return m_animationInitiator; } AnimationInitiator animationInitiator(void) { return m_animationInitiator; }
DefaultAnimation lastDefaultAnimation(void) { return m_lastDefaultAnimation; } DefaultAnimation lastDefaultAnimation(void) { return m_lastDefaultAnimation; }

View file

@ -30,6 +30,8 @@ void AnimationController::changeAnimation(std::unique_ptr<Animation> anim, bool
m_nextAnimation.reset(nullptr); m_nextAnimation.reset(nullptr);
} }
m_animationInitiator = animInitiator;
xSemaphoreGive(m_updateMutex); xSemaphoreGive(m_updateMutex);
} }