From f36b2dbce9007e62f4295d161fd9616cbd4025c2 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Wed, 14 Feb 2018 01:07:48 +0100 Subject: [PATCH] steelseries: default resolutions to 800/1600 The steelseries mice have 2 resolutions. The range/interval is different per device. We cannot query the devices, so we have to pick some defaults. Before we took the two first in the list to be safe. It is a pretty bad default though. Using 800 and 1600 is supported by all known devices and seem as more reasonable defaults. --- src/driver-steelseries.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/driver-steelseries.c b/src/driver-steelseries.c index cdf44694..a1ba2bfa 100644 --- a/src/driver-steelseries.c +++ b/src/driver-steelseries.c @@ -176,8 +176,10 @@ steelseries_probe(struct ratbag_device *device) (unsigned int *)dpilist->entries, dpilist->nentries); - resolution->dpi_x = resolution->dpis[resolution->index]; - resolution->dpi_y = resolution->dpis[resolution->index]; + /* 800 and 1600 seem as reasonable defaults supported + * by all known devices. */ + resolution->dpi_x = 800 * (resolution->index + 1); + resolution->dpi_y = 800 * (resolution->index + 1); ratbag_resolution_set_report_rate_list(resolution, report_rates, ARRAY_LENGTH(report_rates));