From d51ec24121836cad1a9ffce910cd3451c5a51884 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Thu, 10 Oct 2024 21:16:38 -0700 Subject: [PATCH] [RGB Matrix] Fix Pixel fractal animation --- quantum/rgb_matrix/animations/pixel_fractal_anim.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quantum/rgb_matrix/animations/pixel_fractal_anim.h b/quantum/rgb_matrix/animations/pixel_fractal_anim.h index bf5c22a64e43..0117fbd2c202 100644 --- a/quantum/rgb_matrix/animations/pixel_fractal_anim.h +++ b/quantum/rgb_matrix/animations/pixel_fractal_anim.h @@ -28,8 +28,14 @@ static bool PIXEL_FRACTAL(effect_params_t* params) { if (g_rgb_timer > wait_timer) { rgb_t rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv); for (uint8_t h = 0; h < MATRIX_ROWS; ++h) { + if (g_led_config.matrix_co[h][MID_COL - 1] == NO_LED || g_led_config.matrix_co[h][MATRIX_COLS - MID_COL] == NO_LED) { + continue; + } // Light and copy columns outward for (uint8_t l = 0; l < MID_COL - 1; ++l) { + if (g_led_config.matrix_co[h][l] == NO_LED || g_led_config.matrix_co[h][MATRIX_COLS - 1 - l] == NO_LED) { + continue; + } rgb_t index_rgb = led[h][l] ? (rgb_t){rgb.r, rgb.g, rgb.b} : (rgb_t){0, 0, 0}; if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][l]], params->flags)) { rgb_matrix_set_color(g_led_config.matrix_co[h][l], index_rgb.r, index_rgb.g, index_rgb.b);