From 92cb7d5423ed30a51ed9c9ea60cc674d4fa68820 Mon Sep 17 00:00:00 2001 From: bellard Date: Fri, 16 Apr 2004 22:17:49 +0000 Subject: [PATCH] NT mouse fix (Mark Jonckheere) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@729 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/pckbd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/pckbd.c b/hw/pckbd.c index ae2cf27f16..2328d209f1 100644 --- a/hw/pckbd.c +++ b/hw/pckbd.c @@ -445,6 +445,10 @@ void kbd_mouse_event(int dx, int dy, int dz, int buttons_state) s->mouse_dx += dx; s->mouse_dy -= dy; s->mouse_dz += dz; + /* XXX: SDL sometimes generates nul events: we delete them */ + if (s->mouse_dx == 0 && s->mouse_dy == 0 && s->mouse_dz == 0 && + s->mouse_buttons == buttons_state) + return; s->mouse_buttons = buttons_state; if (!(s->mouse_status & MOUSE_STATUS_REMOTE) &&