xwhatsit keyboards: improve logic to detect > 16 physical cols
authorPurdea Andrei <andrei@purdea.ro>
Sat, 25 Jul 2020 05:07:05 +0000 (08:07 +0300)
committerPurdea Andrei <andrei@purdea.ro>
Sat, 25 Jul 2020 05:07:05 +0000 (08:07 +0300)
keyboards/xwhatsit/matrix.c

index 7703ac8..fa67367 100644 (file)
@@ -319,7 +319,7 @@ void dac_write_threshold(uint16_t value)
 
 #endif
 
-#define SHIFT_BITS ((MATRIX_COLS > 16) ? 24 : 16)
+#define SHIFT_BITS ((CAPSENSE_KEYMAP_COL_TO_PHYSICAL_COL(MATRIX_COLS - 1) >= 16) ? 24 : 16)
 
 void shift_select_nothing(void)
 {