aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-hid.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-25 23:58:51 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-25 23:58:51 +0000
commit2e5d83bbef5a539f22970c2bccd19b125d82aab0 (patch)
treef733c22c2f4d19bd0a00f373b919e2e3ada86241 /hw/usb-hid.c
parente6f3e5e016cc7473bc008f341d8e22bd989e03cb (diff)
Rearrange SCSI disk emulation code.
Add USB mass storage device emulation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1940 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb-hid.c')
-rw-r--r--hw/usb-hid.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/usb-hid.c b/hw/usb-hid.c
index 17160ebe32..883befcc36 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -323,10 +323,16 @@ static int usb_tablet_poll(USBMouseState *s, uint8_t *buf, int len)
return l;
}
-static void usb_mouse_handle_reset(USBDevice *dev)
+static void usb_mouse_handle_reset(USBDevice *dev, int destroy)
{
USBMouseState *s = (USBMouseState *)dev;
+ if (destroy) {
+ qemu_add_mouse_event_handler(NULL, NULL, 0);
+ qemu_free(s);
+ return;
+ }
+
s->dx = 0;
s->dy = 0;
s->dz = 0;