fix for nasty bug with frame dropping playback.

When playback was running fast the frame step could be 0, making playback jittery.
this commit just makes sure the frame step is at least 1, but there is still an issue with framedrop skipping too many frames (or too few) which Ill check on next.
This commit is contained in:
Campbell Barton
2012-10-25 11:48:56 +00:00
parent 1e74e1c1f7
commit 4f812f6b21

View File

@@ -3045,7 +3045,8 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
}
else {
if (sync) {
int step = floor((wt->duration - sad->last_duration) * FPS);
const int step = max_ii(1, floor((wt->duration - sad->last_duration) * FPS));
/* skip frames */
if (sad->flag & ANIMPLAY_FLAG_REVERSE)
scene->r.cfra -= step;