Aric Stewart : hid: Implement HidP_MaxDataListLength.
Alexandre Julliard
julliard at winehq.org
Mon Jan 30 15:39:16 CST 2017
Module: wine
Branch: master
Commit: 6bf21e1a5443b98860d0acd2e134dae0f13f0f1e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6bf21e1a5443b98860d0acd2e134dae0f13f0f1e
Author: Aric Stewart <aric at codeweavers.com>
Date: Fri Jan 27 07:17:53 2017 -0600
hid: Implement HidP_MaxDataListLength.
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/hid/hid.spec | 2 +-
dlls/hid/hidp.c | 20 ++++++++++++++++++++
include/ddk/hidpi.h | 1 +
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/dlls/hid/hid.spec b/dlls/hid/hid.spec
index 205b626..fe8002e 100644
--- a/dlls/hid/hid.spec
+++ b/dlls/hid/hid.spec
@@ -32,7 +32,7 @@
@ stdcall HidP_GetUsagesEx(long long ptr ptr ptr ptr long)
@ stdcall HidP_GetValueCaps(long ptr ptr ptr)
@ stdcall HidP_InitializeReportForID(long long ptr ptr long)
-@ stub HidP_MaxDataListLength
+@ stdcall HidP_MaxDataListLength(long ptr)
@ stdcall HidP_MaxUsageListLength(long long ptr)
@ stub HidP_SetData
@ stub HidP_SetScaledUsageValue
diff --git a/dlls/hid/hidp.c b/dlls/hid/hidp.c
index d031b67..da57665 100644
--- a/dlls/hid/hidp.c
+++ b/dlls/hid/hidp.c
@@ -763,3 +763,23 @@ NTSTATUS WINAPI HidP_GetUsagesEx(HIDP_REPORT_TYPE ReportType, USHORT LinkCollect
return rc;
}
+
+ULONG WINAPI HidP_MaxDataListLength(HIDP_REPORT_TYPE ReportType, PHIDP_PREPARSED_DATA PreparsedData)
+{
+ WINE_HIDP_PREPARSED_DATA *data = (WINE_HIDP_PREPARSED_DATA *)PreparsedData;
+ TRACE("(%i, %p)\n", ReportType, PreparsedData);
+ if (data->magic != HID_MAGIC)
+ return 0;
+
+ switch(ReportType)
+ {
+ case HidP_Input:
+ return data->caps.NumberInputDataIndices;
+ case HidP_Output:
+ return data->caps.NumberOutputDataIndices;
+ case HidP_Feature:
+ return data->caps.NumberFeatureDataIndices;
+ default:
+ return 0;
+ }
+}
diff --git a/include/ddk/hidpi.h b/include/ddk/hidpi.h
index 2b0eebd..902fa79 100644
--- a/include/ddk/hidpi.h
+++ b/include/ddk/hidpi.h
@@ -181,6 +181,7 @@ NTSTATUS WINAPI HidP_TranslateUsagesToI8042ScanCodes(USAGE *ChangedUsageList, UL
NTSTATUS WINAPI HidP_GetSpecificButtonCaps(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, HIDP_BUTTON_CAPS *ButtonCaps, USHORT *ButtonCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
NTSTATUS WINAPI HidP_GetSpecificValueCaps(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, HIDP_VALUE_CAPS *ValueCaps, USHORT *ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
NTSTATUS WINAPI HidP_GetUsagesEx(HIDP_REPORT_TYPE ReportType, USHORT LinkCollection, USAGE_AND_PAGE *ButtonList, ULONG *UsageLength, PHIDP_PREPARSED_DATA PreparsedData, CHAR *Report, ULONG ReportLength);
+ULONG WINAPI HidP_MaxDataListLength(HIDP_REPORT_TYPE ReportType, PHIDP_PREPARSED_DATA PreparsedData);
#ifndef FACILITY_HID_ERROR_CODE
#define FACILITY_HID_ERROR_CODE 0x11
More information about the wine-cvs
mailing list