forked from drath/libratbag
hidpp20: shut one ratbagd warning
If the profile is not active, we do not know which resolution is currently used. Instead of having ratbagd complaining, just set the default as active. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
@@ -737,8 +737,11 @@ hidpp20drv_read_profile_8100(struct ratbag_profile *profile, unsigned int index)
|
||||
if (profile->is_active &&
|
||||
res->dpi_x == dpi)
|
||||
res->is_active = true;
|
||||
if (i == p->default_dpi)
|
||||
if (i == p->default_dpi) {
|
||||
res->is_default = true;
|
||||
if (!profile->is_active)
|
||||
res->is_active = true;
|
||||
}
|
||||
|
||||
ratbag_resolution_set_range(res, sensor->dpi_min, sensor->dpi_max);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user