forked from drath/libratbag
hidpp10: store the resolution/refresh rate in the hidpp device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user