mirror of https://github.com/zmkfirmware/zmk.git
fix(hid): initialize missing d_scroll_x field in mouse report (#3196)
The static mouse_report definition did not initialize the d_scroll_x field. The zmk_hid_mouse_report_body structure contains five fields (buttons, d_x, d_y, d_scroll_y, d_scroll_x), but d_scroll_x was left uninitialized. Initialize d_scroll_x to 0 to ensure all fields in the mouse report are properly initialized and avoid potential undefined behavior.
This commit is contained in:
parent
36dbf46764
commit
abce9deab7
|
|
@ -29,7 +29,7 @@ static uint8_t keys_held = 0;
|
|||
|
||||
static struct zmk_hid_mouse_report mouse_report = {
|
||||
.report_id = ZMK_HID_REPORT_ID_MOUSE,
|
||||
.body = {.buttons = 0, .d_x = 0, .d_y = 0, .d_scroll_y = 0}};
|
||||
.body = {.buttons = 0, .d_x = 0, .d_y = 0, .d_scroll_y = 0, .d_scroll_x = 0}};
|
||||
|
||||
#endif // IS_ENABLED(CONFIG_ZMK_POINTING)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue