提交 dbb2a132 编写于 作者: G Gerd Hoffmann

input: map INPUT_BUTTON_WHEEL_{UP,DOWN} to legacy input z axis moves.

Unbreaks mouse wheel.
Reported-by: NBALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 c3aa84b6
...@@ -359,6 +359,20 @@ static void legacy_mouse_event(DeviceState *dev, QemuConsole *src, ...@@ -359,6 +359,20 @@ static void legacy_mouse_event(DeviceState *dev, QemuConsole *src,
} else { } else {
s->buttons &= ~bmap[evt->btn->button]; s->buttons &= ~bmap[evt->btn->button];
} }
if (evt->btn->down && evt->btn->button == INPUT_BUTTON_WHEEL_UP) {
s->qemu_put_mouse_event(s->qemu_put_mouse_event_opaque,
s->axis[INPUT_AXIS_X],
s->axis[INPUT_AXIS_Y],
-1,
s->buttons);
}
if (evt->btn->down && evt->btn->button == INPUT_BUTTON_WHEEL_DOWN) {
s->qemu_put_mouse_event(s->qemu_put_mouse_event_opaque,
s->axis[INPUT_AXIS_X],
s->axis[INPUT_AXIS_Y],
1,
s->buttons);
}
break; break;
case INPUT_EVENT_KIND_ABS: case INPUT_EVENT_KIND_ABS:
s->axis[evt->abs->axis] = evt->abs->value; s->axis[evt->abs->axis] = evt->abs->value;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册