forked from drath/libratbag
hidpp20: require HIDPP_PAGE_COLOR_LED_EFFECTS for LEDs to work
If HIDPP_PAGE_COLOR_LED_EFFECTS fails but the profile returns a nonzero LED count we crash later in hidpp20drv_read_led() because all the led info is null. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Benjamin Tissoires
parent
ec442b960d
commit
ab2dae47af
@@ -1016,7 +1016,9 @@ hidpp20drv_init_feature(struct ratbag_device *device, uint16_t feature)
|
||||
drv_data->num_profiles = drv_data->profiles->num_profiles;
|
||||
drv_data->num_resolutions = drv_data->profiles->num_modes;
|
||||
drv_data->num_buttons = drv_data->profiles->num_buttons;
|
||||
drv_data->num_leds = drv_data->profiles->num_leds;
|
||||
/* We ignore the profile's num_leds and require
|
||||
* HIDPP_PAGE_COLOR_LED_EFFECTS to succeed instead
|
||||
*/
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user