From: "Daniel Godás" <dgodas@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Usb mouse fix
Date: Wed, 2 Jan 2008 16:48:47 +0100 [thread overview]
Message-ID: <e4de053b0801020748i2d07be2fh6c26d093c383f89e@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]
Hi,
i think ive found a little bug on the usb mouse emulation (only with the
mouse, not the tablet), the wheel doesnt seem to work (it just doesnt do
anything). Ive tracked the problem down to usb-hid.c:
static const uint8_t qemu_mouse_hid_report_descriptor[] = {
0x05, 0x01, 0x09, 0x02, 0xA1, 0x01, 0x09, 0x01,
0xA1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x03,
0x15, 0x00, 0x25, 0x01, 0x95, 0x03, 0x75, 0x01,
0x81, 0x02, 0x95, 0x01, 0x75, 0x05, 0x81, 0x01,
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x15, 0x81,
0x25, 0x7F, 0x75, 0x08, 0x95, 0x02, 0x81, 0x06,
0xC0, 0xC0,
};
That descriptor doesnt contain a 'wheel' section so when the virtualized OS
gives me the TD it only has space for dx and dy and not for the wheel delta
(its got a maximum length of 3). To fix the problem i just modified the
descriptor, here is the new one:
static const uint8_t qemu_mouse_hid_report_descriptor[] = {
0x05, 0x01, 0x09, 0x02, 0xA1, 0x01, 0x09, 0x01,
0xA1, 0x00, 0x05, 0x09, 0x19, 0x01, 0x29, 0x03,
0x15, 0x00, 0x25, 0x01, 0x95, 0x03, 0x75, 0x01,
0x81, 0x02, 0x95, 0x01, 0x75, 0x05, 0x81, 0x01,
0x05, 0x01, 0x09, 0x30, 0x09, 0x31, 0x15, 0x81,
0x25, 0x7F, 0x75, 0x08, 0x95, 0x02, 0x81, 0x06,
0x05, 0x01, 0x09, 0x38, 0x15, 0x81, 0x25, 0x7F,
0x35, 0x00, 0x45, 0x00, 0x75, 0x08, 0x95, 0x01,
0x81, 0x02, 0xC0, 0xC0,
};
Now the virtualized OS gives me a TD with a maximum length of 4 and the
wheel works just fine.
Cheers,
Daniel
[-- Attachment #2: Type: text/html, Size: 1682 bytes --]
reply other threads:[~2008-01-02 15:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e4de053b0801020748i2d07be2fh6c26d093c383f89e@mail.gmail.com \
--to=dgodas@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).