diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index 62bbeb3a..2ff5e6bb 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -592,7 +592,7 @@ hidpp20drv_read_profile_8100(struct ratbag_profile *profile, unsigned int index) struct hidpp20drv_data *drv_data = ratbag_get_drv_data(device); struct ratbag_resolution *res; struct hidpp20_profile *p; - unsigned i, dpi; + unsigned i, dpi = 0; hidpp20drv_read_onboard_profile(device, profile->index); @@ -600,6 +600,10 @@ hidpp20drv_read_profile_8100(struct ratbag_profile *profile, unsigned int index) if ((int)index == hidpp20drv_current_profile(device)) profile->is_active = true; + /* retrieve the resolution through 220X as the profile doesn't has it */ + if (profile->is_active) + hidpp20drv_read_resolution_dpi(profile); + dpi = ratbag_resolution_get_dpi(profile->resolution.modes); p = &drv_data->profiles->profiles[index];