Skip to content

Commit

Permalink
anim: only clear on --clear
Browse files Browse the repository at this point in the history
  • Loading branch information
JerwuQu committed Sep 14, 2024
1 parent 053e154 commit f2b636d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ fn main() {
let now_time = SystemTime::now();
let next_frame = now_time + *delay;
// TODO: handle clear properly when animation has varying image sizes
draw(&dev, drawable, frame_idx == 0);
draw(&dev, drawable, frame_idx == 0 && image_args.draw_args.clear);
frame_idx += 1;
if now_time < next_frame {
std::thread::sleep(next_frame.duration_since(SystemTime::now()).unwrap());
Expand Down

0 comments on commit f2b636d

Please sign in to comment.