Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f978b9b authored by Jiri Kosina's avatar Jiri Kosina
Browse files

HID: extend mask for BUTTON usage page



Now that joystick button usages can expand over 15 buttons, we
have to properly mask out the code from hid usage to cover the
whole 0xffff available space.

Reported-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent ff5cf34c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
		break;

	case HID_UP_BUTTON:
		code = ((usage->hid - 1) & 0xf);
		code = ((usage->hid - 1) & HID_USAGE);

		switch (field->application) {
		case HID_GD_MOUSE: