diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-25 15:48:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-25 15:48:56 +0400 |
commit | 4f812f6b21fa033bf0f56519b0e1ea5a42fb1362 (patch) | |
tree | 33b7aab992b4f3c285bf216687bc197f19daabcc /source/blender/editors/screen | |
parent | 1e74e1c1f7c9c87c64de428a2c365511905a6333 (diff) |
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.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index cd8a7978fb6..4ce97ea4305 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -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; |