diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-12-05 10:42:24 +1000 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2018-12-07 16:27:13 +0100 |
commit | 2dc702c991e3774af9d7ce410eef410ca9e2357e (patch) | |
tree | 227cb95401e7b53c2f60edd52bee40e0b683f3da /scripts/gcc-x86_32-has-stack-protector.sh | |
parent | 5a4abb36f312cf83206b1b7d1308ba47cba0b3cc (diff) | |
download | blackbird-obmc-linux-2dc702c991e3774af9d7ce410eef410ca9e2357e.tar.gz blackbird-obmc-linux-2dc702c991e3774af9d7ce410eef410ca9e2357e.zip |
HID: input: use the Resolution Multiplier for high-resolution scrolling
Windows uses a magic number of 120 for a wheel click. High-resolution
scroll wheels are supposed to use a fraction of 120 to signal smaller
scroll steps. This is implemented by the Resolution Multiplier in the
device itself.
If the multiplier is present in the report descriptor, set it to the
logical max and then use the resolution multiplier to calculate the
high-resolution events. This is the recommendation by Microsoft, see
http://msdn.microsoft.com/en-us/windows/hardware/gg487477.aspx
Note that all mice encountered so far have a logical min/max of 0/1, so
it's a binary "yes or no" to high-res scrolling anyway.
To make userspace simpler, always enable the REL_WHEEL_HI_RES bit. Where
the device doesn't support high-resolution scrolling, the value for the
high-res data will simply be a multiple of 120 every time. For userspace,
if REL_WHEEL_HI_RES is available that is the one to be used.
Potential side-effect: a device with a Resolution Multiplier applying to
other Input items will have those items set to the logical max as well.
This cannot easily be worked around but it is doubtful such devices exist.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Verified-by: Harry Cutts <hcutts@chromium.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'scripts/gcc-x86_32-has-stack-protector.sh')
0 files changed, 0 insertions, 0 deletions