From 016de548fc8184878f62b1166c8c8857965680dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Thu, 15 Aug 2019 13:41:07 +0100 Subject: [PATCH] hidpp20: fix setting default resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe LaĆ­ns --- src/driver-hidpp20.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index 38b47df2..93dd17ab 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -928,6 +928,9 @@ hidpp20drv_update_resolution_dpi_8100(struct ratbag_resolution *resolution, h_profile = &drv_data->profiles->profiles[profile->index]; h_profile->dpi[resolution->index] = dpi; + if (resolution->is_default) + h_profile->default_dpi = resolution->index; + return RATBAG_SUCCESS; }