hidpp10: Read colors in profiles

This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-09-17 17:05:14 +02:00
parent 5d992faf1f
commit cbc0f0c4c7
2 changed files with 10 additions and 1 deletions

View File

@@ -389,7 +389,10 @@ union _hidpp10_button_binding {
_Static_assert(sizeof(union _hidpp10_button_binding) == 3, "Invalid size");
struct _hidpp10_profile {
uint8_t unknown[4];
uint8_t red;
uint8_t green;
uint8_t blue;
uint8_t unknown;
struct _hidpp10_dpi_mode dpi_modes[PROFILE_NUM_DPI_MODES];
uint8_t angle_correction;
uint8_t default_dpi_mode;
@@ -450,6 +453,9 @@ hidpp10_get_profile(struct hidpp10_device *dev, int8_t number, struct hidpp10_pr
return res;
}
profile.red = p->red;
profile.green = p->green;
profile.blue = p->blue;
profile.angle_correction = p->angle_correction;
profile.default_dpi_mode = p->default_dpi_mode;
profile.refresh_rate = p->usb_refresh_rate ? 1000/p->usb_refresh_rate : 0;

View File

@@ -132,6 +132,9 @@ struct hidpp10_profile {
} dpi_modes[5];
size_t num_dpi_modes;
uint8_t red;
uint8_t green;
uint8_t blue;
bool angle_correction;
uint8_t default_dpi_mode;
uint16_t refresh_rate;