forked from drath/libratbag
hidpp20: Fix changing flags in hidpp20_special_key_mouse_set_control
The first bit of each pair set is new state for the flag, the second must be set for the change to be made.
This commit is contained in:
committed by
Benjamin Tissoires
parent
a9f4049841
commit
ec85b6db3e
@@ -785,12 +785,15 @@ hidpp20_special_key_mouse_set_control(struct hidpp20_device *device,
|
||||
return -ENOTSUP;
|
||||
|
||||
msg.msg.sub_id = feature_index;
|
||||
msg.msg.parameters[2] |= 0x02;
|
||||
if (control->reporting.divert)
|
||||
msg.msg.parameters[2] |= 0x03;
|
||||
msg.msg.parameters[2] |= 0x01;
|
||||
msg.msg.parameters[2] |= 0x08;
|
||||
if (control->reporting.persist)
|
||||
msg.msg.parameters[2] |= 0x0c;
|
||||
msg.msg.parameters[2] |= 0x04;
|
||||
msg.msg.parameters[2] |= 0x20;
|
||||
if (control->reporting.raw_XY)
|
||||
msg.msg.parameters[2] |= 0x20;
|
||||
msg.msg.parameters[2] |= 0x10;
|
||||
|
||||
return hidpp20_request_command(device, &msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user