[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] ui: input-linux: Add absolute event support
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH] ui: input-linux: Add absolute event support |
Date: |
Fri, 05 May 2017 12:01:19 +0200 |
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