1
0
forked from drath/libratbag

hidpp20: fix resolution count detection

fix #343

Signed-off-by: Ogier Bouvier <obouvier@logitech.com>
This commit is contained in:
Ogier Bouvier
2017-09-14 13:28:22 +02:00
committed by Benjamin Tissoires
parent 8440a36f92
commit c56c76e07d

View File

@@ -495,7 +495,12 @@ hidpp20drv_read_resolution_dpi_2201(struct ratbag_device *device)
drv_data->sensors[0].dpi_max);
drv_data->num_sensors = rc;
drv_data->num_resolutions = drv_data->num_sensors;
/* if 0x8100 has already been enumerated we already have the supported
* number of resolutions and shouldn't overwrite it
*/
if (!(drv_data->capabilities & HIDPP_CAP_ONBOARD_PROFILES_8100))
drv_data->num_resolutions = drv_data->num_sensors;
return 0;
}