From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FT3tg-0007I8-Od for qemu-devel@nongnu.org; Mon, 10 Apr 2006 17:26:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FT3tf-0007Ha-Hl for qemu-devel@nongnu.org; Mon, 10 Apr 2006 17:26:08 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FT3tf-0007HT-C7 for qemu-devel@nongnu.org; Mon, 10 Apr 2006 17:26:07 -0400 Received: from [203.190.192.17] (helo=wasp.net.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FT3yN-000176-JZ for qemu-devel@nongnu.org; Mon, 10 Apr 2006 17:31:00 -0400 Message-ID: <443ACDBB.8070704@wasp.net.au> Date: Tue, 11 Apr 2006 01:27:23 +0400 From: Brad Campbell Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_wasp.net.au-22625-1144704363-0001-2" Subject: Re: [Qemu-devel] USB Tablet Emulation References: <443802FB.9060700@win4lin.com> <44381AE0.1020106@wasp.net.au> <443825D8.3080602@win4lin.com> <443953D7.3060109@wasp.net.au> <44395575.1040303@austin.rr.com> <44395EE9.3040403@wasp.net.au> <44396E20.6010103@wasp.net.au> <4439753C.8080405@us.ibm.com> <44397848.1070707@wasp.net.au> <44397EFA.5070104@us.ibm.com> <44398445.4010602@wasp.net.au> <443985C3.1000206@us.ibm.com> <4439954C.1050609@wasp.net.au> <4439D396.6010006@us.ibm.com> <443A72A4.4090608@win4lin.com> <443A7964.7050704@us.ibm.com> <443A7C2E.9020600@win4lin.com> <443A82E8.5050201@wasp.net.au> <443AB1E4.3050607@wasp.net.au> <443AB591.3030501@wasp.net.au> In-Reply-To: <443AB591.3030501@wasp.net.au> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --=_wasp.net.au-22625-1144704363-0001-2 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit Brad Campbell wrote: > Brad Campbell wrote: >> Brad Campbell wrote: >> >>> The wheel works in SDL although there is currently a bug where it >>> steps by 2 instead of 1.. so it's ok for scrolling, but scrolling >>> through a selection box causes it to skip every second selection. >>> I've not tested the wheel with the vnc patch yet. I'll get to those >>> tonight.. >> >> Wheel works in VNC unmodified :) (yay) >> >> I've been playing some more on the Win98 calibration issue and I'll >> keep looking at that, but for now it' still a no-go. And the 2 step >> wheel thing still needs fixing. > > Fixed the descriptor.. Now works perfectly in Win98, 2k and XP :) > Spoke too soon.. revised patch that actually has been completely tested in all 3. For those thinking of going into a career of hid descriptor writing.. DON'T! Win98 does not parse the descriptor properly.. and win2k/xp appear to adhere strictly to the specs. We should now be in a pretty compliant position with all bases covered. Also attached a small patch to sdl.c which solves the double wheel messages. The wheel is just 2 buttons.. up and down effectively, and we were sending a delta on both press and release of each button, where it should only be a press. This makes the double events go away and I can scroll line by line through any listbox or list. For those that just want to play. This is a rollup of Anthony's patch, Leo's win2k-hack patch and all my latest fixes plus the vnc patch. It applies directly over the latest cvs checkout and is enabled with -usb -usbdevice tablet. http://fnarfbargle.dyndns.org:81/qemu/qemu-hid-rfb-ide.patch.gz Brad -- "Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so." -- Douglas Adams --=_wasp.net.au-22625-1144704363-0001-2 Content-Type: text/plain; name="qemu-usb-hid-002.patch"; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-usb-hid-002.patch" --- qemu-clean/hw/usb-hid.c 2006-04-10 23:39:14.000000000 +0400 +++ qemu/hw/usb-hid.c 2006-04-11 01:15:49.000000000 +0400 @@ -161,7 +161,7 @@ 0x00, /* u8 country_code */ 0x01, /* u8 num_descriptors */ 0x22, /* u8 type; Report */ - 65, 0, /* u16 len */ + 74, 0, /* u16 len */ /* one endpoint (status change endpoint) */ 0x07, /* u8 ep_bLength; */ @@ -188,29 +188,40 @@ 0xA1, 0x01, /* Collection Application */ 0x09, 0x01, /* Usage Pointer */ 0xA1, 0x00, /* Collection Physical */ - 0x05, 0x09, /* Usage Page Button */ + + 0x05, 0x09, /* Usage Page Button */ 0x19, 0x01, /* Usage Minimum Button 1 */ 0x29, 0x03, /* Usage Maximum Button 3 */ 0x15, 0x00, /* Logical Minimum 0 */ 0x25, 0x01, /* Logical Maximum 1 */ - 0x95, 0x03, /* Report Count 3 */ + + 0x95, 0x03, /* Report Count 3 */ 0x75, 0x01, /* Report Size 1 */ 0x81, 0x02, /* Input (Data, Var, Abs) */ 0x95, 0x01, /* Report Count 1 */ 0x75, 0x05, /* Report Size 5 */ - 0x81, 0x01, /* Input (Cnst, Var, Abs) */ + + 0x81, 0x01, /* Input (Cnst, Var, Abs) */ 0x05, 0x01, /* Usage Page Generic Desktop */ - 0x09, 0x30, /* Usage X */ + 0x09, 0x30, /* Usage X */ 0x09, 0x31, /* Usage Y */ 0x15, 0x00, /* Logical Minimum 0 */ - 0x27, 0xFF, 0xFF, 0x00, 0x00, /* Logical Maximum 0xffff */ - 0x75, 0x10, /* Report Size 16 */ - 0x95, 0x02, /* Report Count 2 */ - 0x81, 0x02, /* Input (Data, Var, Abs) */ + + 0x26, 0xFF, 0x7F, /* Logical Maximum 0x7fff */ + 0x35, 0x00, /* Physical Minimum 0 */ + 0x46, 0xFE, 0x7F, /* Physical Maximum 0x7fff */ + 0x75, 0x10, /* Report Size 16 */ + + 0x95, 0x02, /* Report Count 2 */ + 0x81, 0x02, /* Input (Data, Var, Abs) */ + 0x05, 0x01, /* Usage Page Generic Desktop */ 0x09, 0x38, /* Usage Wheel */ 0x15, 0x81, /* Logical Minimum -127 */ - 0x25, 0x7F, /* Logical Maximum 127 */ - 0x75, 0x08, /* Report Size 8 */ + + 0x25, 0x7F, /* Logical Maximum 127 */ + 0x35, 0x00, /* Physical Minimum 0 (same as logical) */ + 0x45, 0x00, /* Physical Maximum 0 (same as logical) */ + 0x75, 0x08, /* Report Size 8 */ 0x95, 0x01, /* Report Count 1 */ 0x81, 0x02, /* Input (Data, Var, Rel) */ 0xC0, /* End Collection */ --=_wasp.net.au-22625-1144704363-0001-2 Content-Type: text/plain; name="qemu-sdl-wheel.patch"; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-sdl-wheel.patch" --- qemu-clean/sdl.c 2006-04-10 23:43:08.000000000 +0400 +++ qemu/sdl.c 2006-04-11 00:56:01.000000000 +0400 @@ -479,9 +479,9 @@ int dz; dz = 0; #ifdef SDL_BUTTON_WHEELUP - if (bev->button == SDL_BUTTON_WHEELUP) { + if (bev->button == SDL_BUTTON_WHEELUP && ev->type == SDL_MOUSEBUTTONDOWN) { dz = -1; - } else if (bev->button == SDL_BUTTON_WHEELDOWN) { + } else if (bev->button == SDL_BUTTON_WHEELDOWN && ev->type == SDL_MOUSEBUTTONDOWN) { dz = 1; } #endif --=_wasp.net.au-22625-1144704363-0001-2--