NT mouse fix (Mark Jonckheere)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@729 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2004-04-16 22:17:49 +00:00
parent 202a456a2b
commit 92cb7d5423
1 changed files with 4 additions and 0 deletions

View File

@ -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) &&