From 97ac0f81f2b1e243a4b9691422bea1f3e345a5ad Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Mon, 10 Jul 2017 16:20:15 +0200 Subject: [PATCH] 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 --- src/driver-hidpp20.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index 20d0b446..ad83dacb 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -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); }