forked from drath/libratbag
hidpp20: color effects, fix endianness
We are receiving big endian, thus the weird power of two locations. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
committed by
bentiss
parent
7afd59149c
commit
15dd6b4f2b
@@ -149,8 +149,8 @@ struct hidpp20_8070_location_mapping {
|
||||
|
||||
static const struct hidpp20_8070_location_mapping hidpp20_8070_location_mapping[] = {
|
||||
LED_LOC_MAPPING(0, "None", RATBAG_LED_TYPE_UNKNOWN),
|
||||
LED_LOC_MAPPING(256, "Logo LED", RATBAG_LED_TYPE_LOGO),
|
||||
LED_LOC_MAPPING(512, "Side LED", RATBAG_LED_TYPE_SIDE),
|
||||
LED_LOC_MAPPING(1, "Logo LED", RATBAG_LED_TYPE_LOGO),
|
||||
LED_LOC_MAPPING(2, "Side LED", RATBAG_LED_TYPE_SIDE),
|
||||
};
|
||||
|
||||
const struct ratbag_button_action *
|
||||
|
||||
@@ -555,7 +555,7 @@ hidpp20_color_led_effects_get_zone_info(struct hidpp20_device *device,
|
||||
return rc;
|
||||
|
||||
msg_info = (struct hidpp20_color_led_zone_info *)msg.msg.parameters;
|
||||
info->location = msg_info->location;
|
||||
info->location = hidpp_be_u16_to_cpu(msg_info->location);
|
||||
info->num_effects = msg_info->num_effects;
|
||||
info->persistency_caps = msg_info->persistency_caps;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user