From 681c7adfefda8756a208f1caaeea118c488a12d6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 9 Jan 2019 16:59:34 -0600 Subject: [PATCH] Fix up calculating animation frame counts. --- sdk/Windows/SMXPanelAnimationUpload.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/Windows/SMXPanelAnimationUpload.cpp b/sdk/Windows/SMXPanelAnimationUpload.cpp index 0890ea6..e9062e0 100644 --- a/sdk/Windows/SMXPanelAnimationUpload.cpp +++ b/sdk/Windows/SMXPanelAnimationUpload.cpp @@ -199,15 +199,15 @@ namespace ProtocolHelpers vector result; int current_frame = 0; - int time_left_in_frame = animation.m_iFrameDurations[0]; + float time_left_in_frame = animation.m_iFrameDurations[0]; result.push_back(0); while(1) { // Advance time by 1/FPS seconds. - time_left_in_frame -= 1 / FPS; + time_left_in_frame -= 1.0f / FPS; result.back()++; - if(time_left_in_frame <= 0.00001) + if(time_left_in_frame <= 0.00001f) { // We've displayed this frame long enough, so advance to the next frame. if(current_frame + 1 == animation.m_iFrameDurations.size())