Skip to content

Commit 5fdbc75

Browse files
committed
screensaver: matrix uses animation count
Signed-off-by: Peter Maxwell Warasila <madmaxwell@soundcomesout.com>
1 parent 5d9cf3f commit 5fdbc75

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

source/core/screensavers.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,16 +282,15 @@ void matrix(void)
282282
{
283283
#define NUM_MATRIX_DOODADS 5
284284
static int x[NUM_MATRIX_DOODADS], y[NUM_MATRIX_DOODADS];
285-
static int started = 0;
286-
if (!started) {
285+
if (!animation_count) {
287286
FbColor(x11_light_green);
288287
FbBackgroundColor(BLACK);
289288
FbClear();
290289
for (int i = 0; i < NUM_MATRIX_DOODADS; i++) {
291290
x[i] = random_num(LCD_XSIZE / 8);
292291
y[i] = random_num(LCD_YSIZE / 8);
293292
}
294-
started = 1;
293+
animation_count = 1;
295294
}
296295

297296
for (int i = 0; i < NUM_MATRIX_DOODADS; i++) {

0 commit comments

Comments
 (0)