From 33455a3245ff17c7d9618ff85a412090a8f870bd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 24 Aug 2015 17:00:16 +1000 Subject: [PATCH] hidpp10: store the resolution/refresh rate in the hidpp device Signed-off-by: Peter Hutterer --- src/hidpp10.c | 5 +++++ src/hidpp10.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/hidpp10.c b/src/hidpp10.c index eaab6417..67e0ace4 100644 --- a/src/hidpp10.c +++ b/src/hidpp10.c @@ -392,6 +392,9 @@ hidpp10_get_current_resolution(struct ratbag_device *device, struct hidpp10_devi log_debug(device->ratbag, "Resolution is %dx%ddpi\n", xres, yres); + dev->xres = xres; + dev->yres = yres; + return 0; } @@ -426,6 +429,8 @@ hidpp10_get_usb_refresh_rate(struct ratbag_device *device, struct hidpp10_device log_debug(device->ratbag, "Refresh rate: %dHz\n", rate); + dev->refresh_rate = rate; + return 0; } diff --git a/src/hidpp10.h b/src/hidpp10.h index 6b1ece98..62acac28 100644 --- a/src/hidpp10.h +++ b/src/hidpp10.h @@ -43,6 +43,8 @@ struct hidpp10_device { uint8_t fw_major; uint8_t fw_minor; uint8_t build; + uint16_t xres, yres; + uint16_t refresh_rate; }; struct _hidpp10_message {