From 10d7eca5af736228fcd1de834eb0d922bec3c8b0 Mon Sep 17 00:00:00 2001 From: Johannes Choo Date: Sat, 17 Jul 2021 00:37:18 +0800 Subject: Fix LED Hit Counter for LED/RGB Matrix (#12674) --- quantum/rgb_matrix/rgb_matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/rgb_matrix/rgb_matrix.c') diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 789cd28605..624e851581 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -230,7 +230,7 @@ void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) { memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); - last_hit_buffer.count--; + last_hit_buffer.count = LED_HITS_TO_REMEMBER - led_count; } for (uint8_t i = 0; i < led_count; i++) { -- cgit v1.2.3