hidpp20: make the hidpp20_root_get_protocol_version compatible with bluetooth and corded

Lokks like the G500 needs a device_idx of 0x00, and the MX Master while on
Bluetooth only answers to report longs

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires
2015-08-20 19:56:38 -04:00
parent eeccaa023c
commit a0f76f18f8

View File

@@ -172,8 +172,8 @@ hidpp20_root_get_protocol_version(struct ratbag_device *device,
{
int rc;
union hidpp20_message msg = {
.msg.report_id = REPORT_ID_SHORT,
.msg.device_idx = 0xff,
.msg.report_id = REPORT_ID_LONG,
.msg.device_idx = 0x00,
.msg.sub_id = HIDPP_PAGE_ROOT_IDX,
.msg.address = CMD_ROOT_GET_PROTOCOL_VERSION,
};