[PATCH resend 7/7] winebus.sys: IOCTL_HID_GET_FEATURE for iohid
Sebastian Lackner
sebastian at fds-team.de
Mon Nov 7 10:26:21 CST 2016
On 04.11.2016 13:47, Aric Stewart wrote:
> Signed-off-by: Aric Stewart <aric at codeweavers.com>
> ---
> dlls/winebus.sys/bus_iohid.c | 33 +++++++++++++++++++++++++++++----
> 1 file changed, 29 insertions(+), 4 deletions(-)
>
>
>
> v2-0007-winebus.sys-IOCTL_HID_GET_FEATURE-for-iohid.txt
>
>
> diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c
> index 59c02ea..402451c 100644
> --- a/dlls/winebus.sys/bus_iohid.c
> +++ b/dlls/winebus.sys/bus_iohid.c
> @@ -218,14 +218,39 @@ static NTSTATUS set_output_report(DEVICE_OBJECT *device, UCHAR id, BYTE *report,
>
> static NTSTATUS get_feature_report(DEVICE_OBJECT *device, UCHAR id, BYTE *report, DWORD length, ULONG_PTR *read)
> {
> - *read = 0;
> - return STATUS_NOT_IMPLEMENTED;
> + IOReturn ret;
> + CFIndex report_length = length;
> + IOHIDDeviceRef dev = *(IOHIDDeviceRef*)get_platform_private(device);
> +
> + ret = IOHIDDeviceGetReport(dev, kIOHIDReportTypeFeature, id, report, &report_length);
> + if (ret == kIOReturnSuccess)
> + {
> + *read = report_length;
> + return STATUS_SUCCESS;
> + }
> + else
> + {
> + *read = 0;
> + return STATUS_UNSUCCESSFUL;
> + }
> }
>
> static NTSTATUS set_feature_report(DEVICE_OBJECT *device, UCHAR id, BYTE *report, DWORD length, ULONG_PTR *written)
> {
> - *written = 0;
> - return STATUS_NOT_IMPLEMENTED;
> + IOReturn result;
> + IOHIDDeviceRef dev = *(IOHIDDeviceRef*)get_platform_private(device);
> +
> + result = IOHIDDeviceSetReport(dev, kIOHIDReportTypeFeature, id, report, length);
The line above has 5 space indentation.
> + if (result == kIOReturnSuccess)
> + {
> + *written = length;
> + return STATUS_SUCCESS;
> + }
> + else
> + {
> + *written = 0;
> + return STATUS_UNSUCCESSFUL;
> + }
> }
>
> static const platform_vtbl iohid_vtbl = {
>
>
>
More information about the wine-devel
mailing list