瀏覽代碼

Save a single byte of memory for joystick buttons (#15555)

Co-authored-by: Joel Challis <git@zvecr.com>
Chris Broekema 3 年之前
父節點
當前提交
c4b03509da
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      quantum/joystick.h

+ 1 - 1
quantum/joystick.h

@@ -50,7 +50,7 @@ extern joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT];
 enum joystick_status { JS_INITIALIZED = 1, JS_UPDATED = 2 };
 
 typedef struct {
-    uint8_t buttons[JOYSTICK_BUTTON_COUNT / 8 + 1];
+    uint8_t buttons[(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1];
 
     int16_t axes[JOYSTICK_AXES_COUNT];
     uint8_t status : 2;