From e3cf15a00f650545bd94e7e6303c4de8a5d26ac2 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 16 Aug 2021 19:52:00 -0700 Subject: [PATCH] Fixes for Android/Linux Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Editor/Controls/ConsoleSCB.cpp | 4 ++-- Gems/LyShine/Code/Source/Animation/AnimTrack.h | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Code/Editor/Controls/ConsoleSCB.cpp b/Code/Editor/Controls/ConsoleSCB.cpp index c4f58b5297..dbe7ba3472 100644 --- a/Code/Editor/Controls/ConsoleSCB.cpp +++ b/Code/Editor/Controls/ConsoleSCB.cpp @@ -837,11 +837,11 @@ static void SetEditorRange(EditorType* editor, IVariable* var) static const float defaultMax = 100.0f; if (var->HasCustomLimits()) { - editor->setRange(static_cast(min), static_cast(max)); + editor->setRange(static_cast(min), static_cast(max)); } else { - editor->setSoftRange(static_cast(defaultMin), static_cast(defaultMax)); + editor->setSoftRange(static_cast(defaultMin), static_cast(defaultMax)); } // Set the step size. The default variable step is 0, so if it's diff --git a/Gems/LyShine/Code/Source/Animation/AnimTrack.h b/Gems/LyShine/Code/Source/Animation/AnimTrack.h index 97a251ebfa..21a78ae6a1 100644 --- a/Gems/LyShine/Code/Source/Animation/AnimTrack.h +++ b/Gems/LyShine/Code/Source/Animation/AnimTrack.h @@ -221,6 +221,8 @@ protected: float m_lastTime; int m_flags; + constexpr unsigned int InvalidKey = 0x7FFFFFFF; + UiAnimParamData m_componentParamData; #ifdef UI_ANIMATION_SYSTEM_SUPPORT_EDITING @@ -521,7 +523,7 @@ inline int TUiAnimTrack::GetActiveKey(float time, KeyType* key) if (nkeys == 0) { m_lastTime = time; - m_currKey = std::numeric_limits::max(); + m_currKey = InvalidKey; return m_currKey; } @@ -554,7 +556,7 @@ inline int TUiAnimTrack::GetActiveKey(float time, KeyType* key) } else { - m_currKey = std::numeric_limits::max(); + m_currKey = InvalidKey; } return m_currKey; } @@ -600,6 +602,6 @@ inline int TUiAnimTrack::GetActiveKey(float time, KeyType* key) break; } } - m_currKey = std::numeric_limits::max(); + m_currKey = InvalidKey; return m_currKey; }