Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/input/wmt.c
Show First 20 Lines • Show All 629 Lines • ▼ Show 20 Lines | #endif | ||||
if (sc->nconts_todo == 0) { | if (sc->nconts_todo == 0) { | ||||
/* Report both the click and external left btns as BTN_LEFT */ | /* Report both the click and external left btns as BTN_LEFT */ | ||||
if (sc->has_int_button) | if (sc->has_int_button) | ||||
int_btn = hid_get_data(buf, len, &sc->int_btn_loc); | int_btn = hid_get_data(buf, len, &sc->int_btn_loc); | ||||
if (isset(sc->buttons, 0)) | if (isset(sc->buttons, 0)) | ||||
left_btn = hid_get_data(buf, len, &sc->btn_loc[0]); | left_btn = hid_get_data(buf, len, &sc->btn_loc[0]); | ||||
if (sc->has_int_button || isset(sc->buttons, 0)) | if (sc->has_int_button || isset(sc->buttons, 0)) | ||||
evdev_push_key(sc->evdev, BTN_LEFT, | evdev_push_key(sc->evdev, BTN_LEFT, | ||||
int_btn != 0 | left_btn != 0); | (int_btn != 0) | (left_btn != 0)); | ||||
for (btn = 1; btn < sc->max_button; ++btn) { | for (btn = 1; btn < sc->max_button; ++btn) { | ||||
if (isset(sc->buttons, btn)) | if (isset(sc->buttons, btn)) | ||||
evdev_push_key(sc->evdev, BTN_MOUSE + btn, | evdev_push_key(sc->evdev, BTN_MOUSE + btn, | ||||
hid_get_data(buf, | hid_get_data(buf, | ||||
len, | len, | ||||
&sc->btn_loc[btn]) != 0); | &sc->btn_loc[btn]) != 0); | ||||
} | } | ||||
evdev_sync(sc->evdev); | evdev_sync(sc->evdev); | ||||
▲ Show 20 Lines • Show All 431 Lines • Show Last 20 Lines |