summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorフィルターペーパー <76888457+filterpaper@users.noreply.github.com>2023-07-07 22:35:22 +0800
committerGitHub <noreply@github.com>2023-07-08 00:35:22 +1000
commit0035ed67627919ac332b096afa97469bd8e73756 (patch)
treea8836e4d29c76a3baffffe1fa60911f525612198
parent43350c347d1a033e16ce6449d30bed1703c791d6 (diff)
Set minimum middle column value (#21365)
-rw-r--r--quantum/rgb_matrix/animations/pixel_fractal_anim.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/quantum/rgb_matrix/animations/pixel_fractal_anim.h b/quantum/rgb_matrix/animations/pixel_fractal_anim.h
index 875b4ceb3d..4cd1d9b861 100644
--- a/quantum/rgb_matrix/animations/pixel_fractal_anim.h
+++ b/quantum/rgb_matrix/animations/pixel_fractal_anim.h
@@ -7,7 +7,11 @@ RGB_MATRIX_EFFECT(PIXEL_FRACTAL)
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static bool PIXEL_FRACTAL(effect_params_t* params) {
-# define MID_COL MATRIX_COLS / 2
+# if MATRIX_COLS < 2
+# define MID_COL 1
+# else
+# define MID_COL MATRIX_COLS / 2
+# endif
static bool led[MATRIX_ROWS][MID_COL];
static uint32_t wait_timer = 0;