diff options
author | bellard | 2005-11-05 17:57:08 +0100 |
---|---|---|
committer | bellard | 2005-11-05 17:57:08 +0100 |
commit | 59ae540c3dbd1ab3fb004e85eaf3aa4f3520a308 (patch) | |
tree | 223154410e3b306e1e47358e61b13155a16b605a /hw/pc.c | |
parent | cosmetics (diff) | |
download | qemu-59ae540c3dbd1ab3fb004e85eaf3aa4f3520a308.tar.gz qemu-59ae540c3dbd1ab3fb004e85eaf3aa4f3520a308.tar.xz qemu-59ae540c3dbd1ab3fb004e85eaf3aa4f3520a308.zip |
added virtual USB mouse support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1599 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -622,24 +622,31 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device, if (pci_enabled && usb_enabled) { USBPort *usb_root_ports[2]; - USBDevice *usb_hub; + USBDevice *usb_dev; usb_uhci_init(pci_bus, usb_root_ports); #if 0 { USBPort *usb_hub1_ports[4]; USBPort *usb_hub2_ports[2]; /* test: we simulate a USB hub */ - usb_hub = usb_hub_init(usb_hub1_ports, 4); - usb_attach(usb_root_ports[0], usb_hub); + usb_dev = usb_hub_init(usb_hub1_ports, 4); + usb_attach(usb_root_ports[0], usb_dev); /* test: we simulate a USB hub */ - usb_hub = usb_hub_init(usb_hub2_ports, 2); - usb_attach(usb_hub1_ports[0], usb_hub); + usb_dev = usb_hub_init(usb_hub2_ports, 2); + usb_attach(usb_hub1_ports[0], usb_dev); } #endif +#if 0 + /* USB mouse */ + usb_dev = usb_mouse_init(); + usb_attach(usb_root_ports[0], usb_dev); +#endif +#if 1 /* simulated hub with the host USB devices connected to it */ - usb_hub = usb_host_hub_init(); - usb_attach(usb_root_ports[0], usb_hub); + usb_dev = usb_host_hub_init(); + usb_attach(usb_root_ports[0], usb_dev); +#endif } /* must be done after all PCI devices are instanciated */ |