diff --git a/src/osdep/dos/dos.c b/src/osdep/dos/dos.c index e2bbce008..bdb97f92c 100644 --- a/src/osdep/dos/dos.c +++ b/src/osdep/dos/dos.c @@ -378,6 +378,7 @@ static void dos_mouse_poll(void) { int i; int cx, cy; + char bb; __dpmi_regs r; dos_poll_break(); if (dos_mouse_initialized) { @@ -419,8 +420,13 @@ px: memset(&r, 0, sizeof r); r.x.ax = 3; __dpmi_int(0x33, &r); + bb = r.x.bx >> 8; cx = dos_mouse_coord(r.x.cx); cy = dos_mouse_coord(r.x.dx); + if (bb) { + dos_mouse_enqueue(cx, cy, bb < 0 ? (B_DOWN | B_WHEEL_UP) : (B_DOWN | B_WHEEL_DOWN)); + goto x; + } if (cx != dos_mouse_last_x || cy != dos_mouse_last_y) { for (i = 0; i < dos_mouse_buttons; i++) if (dos_mouse_last_button & (1 << i)) {