1
0
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:
Benjamin Tissoires
2017-07-10 16:20:15 +02:00
parent 8cfcab3363
commit 97ac0f81f2

View File

@@ -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);
}