Commit graph

74 commits

Author SHA1 Message Date
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
Rémi Bernon
cce8074aa9 hid: Fill the HIDD_ATTRIBUTES Size member, and add a test for expected size.
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>
2019-06-20 23:02:22 +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
Alistair Leslie-Hughes
718b1bc542 hid: Implement HidD_FlushQueue().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45878
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-04-08 19:35:47 +02:00
Zebediah Figura
5ae3910e93 hid: Implement HidD_GetIndexedString().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46711
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-04-08 19:35:36 +02:00
Zebediah Figura
a0a3b6b90e hid: Fix length argument to GetOverlappedResult().
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-04-01 21:54:31 +02:00
Detlef Riekenberg
4640081494 hid/tests: Do not fail when the device is busy.
Some devices do not allow shared access (mouse, sound device).

Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-25 16:17:10 +01:00
Detlef Riekenberg
f5f34fe018 hid/tests: Do not access uninitialized memory.
Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-25 16:16:53 +01:00
Zebediah Figura
ea7b8ad924 hid: Handle overlapped file handles.
This fixes a crash in the hid:device tests for me, and likely helps
with bug 46711.

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-03-14 23:52:59 +01: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
Zebediah Figura
4526c5923c hid/tests: Use DIGCF_PRESENT.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-19 17:46:30 +02:00
Andrew Eikum
2de3dc3dd6 hid: Pass a buffer to DeviceIoControl in HidD_SetNumInputBuffers.
DeviceIoControl expects a pointer, and this value gets dereferenced as a
ULONG* in hidclass.sys.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-09 20:32:27 +01:00
Andrey Gusev
d4ea289dc1 hid/tests: Remove redundant comparison.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-09 19:51:14 +02:00
Marcus Meissner
0a2e48933d hid: Increase buffer size to allow 16bit value + space + NUL (GCC7).
Signed-off-by: Marcus Meissner <meissner@suse.de>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-02 17:25:13 +02:00
Michael Stefaniuc
b89e3f80ae hid/tests: Remove duplicated for condition (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-15 22:58:45 +01:00
Francois Gouget
e829de27fd hid/tests: Remove a space before a '\n'.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:10 +01:00
Aric Stewart
1ccb1719cb hidclass.sys: IOCTL_HID_GET_INPUT_REPORT has report ID as first byte.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-02 20:40:13 +01:00
Aric Stewart
41a82d8037 hid/tests: Test HidD_GetInputReport.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-01 19:52:58 +01:00
Aric Stewart
150f179716 hid/tests: Test device reads.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-01 19:52:23 +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
178400b2bf hid/tests: Add HID device enumeration test.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 10:35:35 +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
fbd3525e24 hid: Implement HidD_GetNumInputBuffers.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 10:35:00 +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
fc1485b86b hid: Implement HidD_SetOutputReport.
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-10-26 20:12:04 +02: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
fa8eedddd5 hid: Implement HidD_SetNumInputBuffers.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-06 14:54:32 +09:00
Aric Stewart
af3406ec61 hid: Implement HidD_GetSerialNumberString.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-30 15:10:14 +09:00
Francois Gouget
6970d65887 hid: Remove spaces before '\n'. 2015-08-07 23:50:20 +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
674080da91 hid: Implement HidD_GetAttributes. 2015-07-01 19:18:19 +09:00
Aric Stewart
eac15cae71 hid: Implement HidD_GetInputReport. 2015-07-01 19:18:19 +09:00