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

Co-authored-by: Joel Challis <git@zvecr.com>
master
Chris Broekema 2021-12-24 23:31:15 +01:00 committed by GitHub
parent 435fa2c391
commit c4b03509da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ extern joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT];
enum joystick_status { JS_INITIALIZED = 1, JS_UPDATED = 2 }; enum joystick_status { JS_INITIALIZED = 1, JS_UPDATED = 2 };
typedef struct { 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]; int16_t axes[JOYSTICK_AXES_COUNT];
uint8_t status : 2; uint8_t status : 2;