diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-01-09 15:38:20 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-01-09 15:38:20 +0000 |
commit | 7d010ae9e0079ea17d56cd961953d8832052c5fd (patch) | |
tree | 0b4fb6275b781df969a6d82e2911e03b712a83b1 /hw | |
parent | 59a0419856c9ed24e9ecd033db092b2e8f81a728 (diff) | |
parent | 4eab7a0a2394275a611a19aef6619402ad524b63 (diff) |
Merge remote-tracking branch 'remotes/mwalle/tags/lm32-fixes/20141229' into staging
lm32: milkymist fixes and MAINTAINER update
# gpg: Signature made Tue 30 Dec 2014 16:54:15 GMT using DSA key ID 3F98A378
# gpg: Can't check signature: public key not found
* remotes/mwalle/tags/lm32-fixes/20141229:
MAINTAINERS: add myself to lm32 and milkymist
milkymist: softmmu: fix event handling
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/input/milkymist-softusb.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/hw/input/milkymist-softusb.c b/hw/input/milkymist-softusb.c index 5a427f0b33..7b0f4db88d 100644 --- a/hw/input/milkymist-softusb.c +++ b/hw/input/milkymist-softusb.c @@ -194,10 +194,13 @@ static void softusb_kbd_hid_datain(HIDState *hs) return; } - len = hid_keyboard_poll(hs, s->kbd_hid_buffer, sizeof(s->kbd_hid_buffer)); + while (hid_has_events(hs)) { + len = hid_keyboard_poll(hs, s->kbd_hid_buffer, + sizeof(s->kbd_hid_buffer)); - if (len == 8) { - softusb_kbd_changed(s); + if (len == 8) { + softusb_kbd_changed(s); + } } } @@ -212,11 +215,13 @@ static void softusb_mouse_hid_datain(HIDState *hs) return; } - len = hid_pointer_poll(hs, s->mouse_hid_buffer, - sizeof(s->mouse_hid_buffer)); + while (hid_has_events(hs)) { + len = hid_pointer_poll(hs, s->mouse_hid_buffer, + sizeof(s->mouse_hid_buffer)); - if (len == 4) { - softusb_mouse_changed(s); + if (len == 4) { + softusb_mouse_changed(s); + } } } |