Skip to content

Commit ceb418f

Browse files
committed
Fix: --max-drawn-pieces now handles 0 correctly
1 parent 85c1ef0 commit ceb418f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/screensaver.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl Screensaver {
262262
state.currently_drawn_pieces += 1;
263263
state.pieces_remaining -= 1;
264264

265-
if state.pieces_total >= cfg.max_drawn_pieces {
265+
if cfg.max_drawn_pieces != 0 && state.pieces_total >= cfg.max_drawn_pieces {
266266
self.clear();
267267
} else if cfg.depth_mode && state.layer_pieces_total >= cfg.layer_max_drawn_pieces {
268268
self.darken_previous_layers();

0 commit comments

Comments
 (0)