Update core/2d/CCMotionStreak.cpp [skip ci]

Co-authored-by: 涓€绾跨伒 <halx99@live.com>
This commit is contained in:
Turky Mohammed 2022-05-04 10:00:38 +03:00 committed by GitHub
parent 022686bda7
commit 30b9d4cb5f
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, const Co
// Fix #629 Motion streak vsync off crash
double interval = _director->getAnimationInterval();
double fps = 1 / interval;
if (roundf(fps) == INFINITY)
if (roundf(fps) > 240.0)
fps = 240.0;
_maxPoints = (int)(fade * fps) + 2;