From: Gerd Hoffmann <kraxel@redhat.com>
To: Philippe Voinov <philippevoinov@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ui: input-linux: Add absolute event support
Date: Fri, 05 May 2017 12:01:19 +0200 [thread overview]
Message-ID: <1493978479.371.82.camel@redhat.com> (raw)
In-Reply-To: <CA+fj4vkysW7iJ4WCLdK-Z9J6MX2pfEZKZyWwFoEbiaOsAre8Ww@mail.gmail.com>
Hi,
> Aside from that, trying to change ui/input.c is probably a bad idea.
> The code
> there expects absolute input values to start at 0. To use the full 32
> bits of
> an int would require absolute axes to have a different starting
> position. This
> would require large changes to ui/input.c and possibly also other code
> using
> it.
No. Internally qemu uses 0 ... INPUT_EVENT_ABS_SIZE.
So only qemu_input_queue_abs() and qemu_input_scale_axis() would need to
be changed, all other code wouldn't notice.
While being at it it probably makes sense to add support for min != 0,
i.e. replace size_in with min_in and max_in in qemu_input_scale_axis, so
you can just pass min + max directly and have the generic input.c code
do the calculations for you.
cheers,
Gerd
prev parent reply other threads:[~2017-05-05 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 7:59 [Qemu-devel] [PATCH] ui: input-linux: Add absolute event support Philippe Voinov
2017-05-05 8:39 ` Gerd Hoffmann
2017-05-05 9:29 ` Philippe Voinov
2017-05-05 10:01 ` Gerd Hoffmann [this message]
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=1493978479.371.82.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=philippevoinov@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).