1
0
forked from drath/libratbag

hidpp20: fix reading has_dpi_shift

The comparison was always false because of missing bit shift.

Signed-off-by: Clément Vuchener <clement.vuchener@gmail.com>
This commit is contained in:
Clément Vuchener
2016-08-30 16:50:18 +02:00
parent 23036eec08
commit f72c96914b

View File

@@ -1286,7 +1286,7 @@ hidpp20_onboard_profiles_initialize(struct hidpp20_device *device,
profiles->num_buttons = msg.msg.parameters[5] <= 16 ? msg.msg.parameters[5] : 16;
profiles->num_modes = HIDPP20_DPI_COUNT;
profiles->has_g_shift = (info->mechanical_layout & 0x03) == 2;
profiles->has_dpi_shift = (info->mechanical_layout & 0x0c) == 2;
profiles->has_dpi_shift = ((info->mechanical_layout & 0x0c) >> 2) == 2;
switch(info->various_info & 0x07) {
case 1:
profiles->corded = 1;