Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vt/vt_sysmouse.c
Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | static const int buttonmap[8] = { | ||||
MOUSE_MSC_BUTTON1UP | MOUSE_MSC_BUTTON2UP, | MOUSE_MSC_BUTTON1UP | MOUSE_MSC_BUTTON2UP, | ||||
MOUSE_MSC_BUTTON2UP, | MOUSE_MSC_BUTTON2UP, | ||||
MOUSE_MSC_BUTTON1UP, | MOUSE_MSC_BUTTON1UP, | ||||
0, | 0, | ||||
}; | }; | ||||
unsigned char buf[MOUSE_SYS_PACKETSIZE]; | unsigned char buf[MOUSE_SYS_PACKETSIZE]; | ||||
int x, y, iy, z; | int x, y, iy, z; | ||||
random_harvest_queue(mi, sizeof *mi, 2, RANDOM_MOUSE); | random_harvest_queue(mi, sizeof *mi, RANDOM_MOUSE); | ||||
mtx_lock(&sysmouse_lock); | mtx_lock(&sysmouse_lock); | ||||
switch (mi->operation) { | switch (mi->operation) { | ||||
case MOUSE_ACTION: | case MOUSE_ACTION: | ||||
sysmouse_status.button = mi->u.data.buttons; | sysmouse_status.button = mi->u.data.buttons; | ||||
/* FALLTHROUGH */ | /* FALLTHROUGH */ | ||||
case MOUSE_MOTION_EVENT: | case MOUSE_MOTION_EVENT: | ||||
x = mi->u.data.x; | x = mi->u.data.x; | ||||
▲ Show 20 Lines • Show All 265 Lines • Show Last 20 Lines |