Rémi Bernon
619bd1867a
hid: Implement HidP_SetUsageValueArray stub.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 22:51:55 +02:00
Rémi Bernon
dec362a766
hid: Check preparsed data magic in HidP_GetLinkCollectionNodes.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 23:04:04 +02:00
Rémi Bernon
45958834b8
hid: Use caps.BitSize to differenciate buttons from values.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:23:20 +02:00
Rémi Bernon
dc7547a84b
hidclass.sys: Factor HIDP_BUTTON_CAPS with HIDP_VALUE_CAPS.
...
Buttons are really just values with BitSize == 1, and having a union for
that makes the code more complicated than it needs.
We'll simplify the code a lot using HIDP_VALUE_CAPS everywhere, as the
two structure types are compatible.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 20:00:30 +02:00
Rémi Bernon
9f193d5d41
hid: Use nameless unions.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-04 20:00:30 +02:00
Gabriel Ivăncescu
ec88633912
hid: Implement HidP_GetUsageValueArray.
...
Games like Risk of Rain 2 need this with certain controllers.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Rémi Bernon
56d529694b
hid: Implement HidP_GetLinkCollectionNodes.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 20:02:40 +01:00
Rémi Bernon
5c145acd4b
hid: Add HidP_GetLinkCollectionNodes stub.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 20:02:40 +01:00
Andrew Eikum
b466419c32
hid: Move preparsed data definition to global header.
...
PHIDP_PREPARSED_DATA is supposed to be an opaque pointer, but the size
is accessible through user32.GetRawInputDeviceInfo(RIDI_PREPARSEDDATA),
so we will need to know the struct layout in user32, too.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 22:43:01 +01:00
Andrew Eikum
6563166142
hid: Fix looking up report in HidP_GetValueCaps.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 19:37:21 +02:00
Alexandre Julliard
f534ccba00
hid: Build with msvcrt.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 08:35:57 +02:00
Andrew Eikum
6a610a3258
hid: Fix usage value mask.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47223
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 23:42:31 +02:00
Piotr Caban
2b5efe1b1c
hid: Fix error handling in HidP_SetUsages.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 21:19:34 +02:00
Piotr Caban
42be0b7701
hid: Set button values in HidP_SetUsages function.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 18:49:39 +02:00
Piotr Caban
395d268565
hid: Change format of preparsed data.
...
Advantages of this format:
- all table elements have constant size, that makes iterating table easier
- allow report lookup by report ID in O(1) time
- doesn't sort reports, it makes it possible to preserve original order
of elements making output of functions more similar to native
- preparsed data is created from collection, this will allow to add
support for multiple top-most collections
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 18:48:51 +02:00
Andrew Eikum
daa9906cce
hid: Shift usage values to LSB.
...
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 13:19:33 -05:00
Piotr Caban
028e1ee3db
hid: Only set first usage in an array in HidP_SetUsageValue.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 08:04:22 -05:00
Piotr Caban
6249de6e5d
hid: Add support for ranges in find_value.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 08:04:18 -05:00
Piotr Caban
c5d704334f
hid: Add HidP_SetUsages implementation.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 08:04:14 -05:00
Zebediah Figura
6ca21b56b4
hid: Scale from logical to physical coördinates in HidP_GetScaledUsageValue().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 20:52:05 +01:00
Zebediah Figura
fbc1a89a40
hid: Correctly sign-extend all values in HidP_GetScaledUsageValue().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 20:51:47 +01:00
Zebediah Figura
b16fb11890
hid: Don't sign-extend 16-bit values.
...
Some controllers (including, with the previous patch, any reported
through SDL) may report a logical range of [0,65535], which takes up
16 bits but should not be sign-extended.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 19:57:27 +01:00
Aric Stewart
a2ab553818
hid: Implement HidP_SetUsageValue.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-27 19:37:09 +01:00
Aric Stewart
a8ab3107cf
hid: Implement HidP_GetData.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 13:07:49 +01:00
Aric Stewart
6bf21e1a54
hid: Implement HidP_MaxDataListLength.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 13:07:45 +01:00
Aric Stewart
cc00075a65
hid: Implement HidP_GetUsagesEx.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 10:35:06 +01:00
Aric Stewart
e724d67fb4
hid: Refine initialization of UsageLength in HidP_GetUsages.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-08 16:06:40 +01:00
Aric Stewart
78a547a11c
hid: Initialize outgoing usages in HidP_GetUsages.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-07 19:38:35 +01:00
Aric Stewart
a4ed76b948
hid: Implement HidP_GetSpecificButtonCaps.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-18 11:12:46 -06:00
Aric Stewart
3c60e4bf58
hid: Implement HidP_GetSpecificValueCaps.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-14 11:07:08 -06:00
Aric Stewart
86f4aa1993
hid: Fix HidP_MaxUsageListLength to handle UsagePage == 0 properly.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-14 11:07:08 -06:00
Aric Stewart
20a4842a89
hid: Correct issues with getting packed values.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-14 11:07:08 -06:00
Aric Stewart
b82ce81957
hid: Stub HidP_TranslateUsagesToI8042ScanCodes.
...
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-21 21:17:37 +09:00
Aric Stewart
098efa1edc
hid: Implement HidP_GetScaledUsageValue.
2015-07-01 19:18:20 +09:00
Aric Stewart
1174fc63ad
hid: Implement HidP_MaxUsageListLength.
2015-07-01 19:18:20 +09:00
Aric Stewart
30480a2369
hid: Implement HidP_InitializeReportForID.
2015-07-01 19:18:18 +09:00
Aric Stewart
ecc6196508
hid: Implement HidP_GetUsageValue.
2015-07-01 19:18:18 +09:00
Aric Stewart
8bb231c4ae
hid: Implement HidP_GetUsages.
2015-07-01 19:18:17 +09:00
Aric Stewart
0bb216ff35
hid: Implement HidP_GetValueCaps.
2015-07-01 19:18:17 +09:00
Aric Stewart
b183dc3d6e
hid: Implement HidP_GetButtonCaps.
2015-07-01 19:18:17 +09:00
Aric Stewart
1e1599d961
hid: Implement HidP_GetCaps.
2015-07-01 19:18:16 +09:00