Closed mmaciola closed 1 year ago
@JSUYA Thanks for review. I have force pushed a change. I changed the condition < to <= so no need for +2 but +1 and I added lround as long type is used, not float as in android implementation.
As lround(), no need for - 0.01f
As mStartFrame and mEndFrame was counted from 0 and totalFrame() was calculated as a difference, there were always one frame missing and the animation rescaled. This patch adds one to the total frames count. As there is 0.01 subtracted (copied from android implementation, needed for some resources where frame no is non-whole number), added +2, not +1. It fixes the problem for all tested resources- requested and all in example/resource.
issue: #527