Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
1174fc63
Commit
1174fc63
authored
Jun 30, 2015
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hid: Implement HidP_MaxUsageListLength.
parent
674080da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
2 deletions
+55
-2
hid.spec
dlls/hid/hid.spec
+1
-1
hidp.c
dlls/hid/hidp.c
+53
-0
hidpi.h
include/ddk/hidpi.h
+1
-1
No files found.
dlls/hid/hid.spec
View file @
1174fc63
...
...
@@ -33,7 +33,7 @@
@ stdcall HidP_GetValueCaps(long ptr ptr ptr)
@ stdcall HidP_InitializeReportForID(long long ptr ptr long)
@ stub HidP_MaxDataListLength
@ st
ub HidP_MaxUsageListLength
@ st
dcall HidP_MaxUsageListLength(long long ptr)
@ stub HidP_SetData
@ stub HidP_SetScaledUsageValue
@ stub HidP_SetUsageValue
...
...
dlls/hid/hidp.c
View file @
1174fc63
...
...
@@ -421,3 +421,56 @@ NTSTATUS WINAPI HidP_InitializeReportForID(HIDP_REPORT_TYPE ReportType, UCHAR Re
return
HIDP_STATUS_SUCCESS
;
}
ULONG
WINAPI
HidP_MaxUsageListLength
(
HIDP_REPORT_TYPE
ReportType
,
USAGE
UsagePage
,
PHIDP_PREPARSED_DATA
PreparsedData
)
{
PWINE_HIDP_PREPARSED_DATA
data
=
(
PWINE_HIDP_PREPARSED_DATA
)
PreparsedData
;
WINE_HID_REPORT
*
report
=
NULL
;
int
r_count
;
int
i
;
int
count
=
0
;
TRACE
(
"(%i, %x, %p)
\n
"
,
ReportType
,
UsagePage
,
PreparsedData
);
if
(
data
->
magic
!=
HID_MAGIC
)
return
0
;
switch
(
ReportType
)
{
case
HidP_Input
:
report
=
HID_INPUT_REPORTS
(
data
);
r_count
=
data
->
dwInputReportCount
;
break
;
case
HidP_Output
:
report
=
HID_OUTPUT_REPORTS
(
data
);
r_count
=
data
->
dwOutputReportCount
;
break
;
case
HidP_Feature
:
report
=
HID_FEATURE_REPORTS
(
data
);
r_count
=
data
->
dwFeatureReportCount
;
break
;
default:
return
HIDP_STATUS_INVALID_REPORT_TYPE
;
}
if
(
!
r_count
||
!
report
)
return
0
;
for
(
i
=
0
;
i
<
r_count
;
i
++
)
{
int
j
;
for
(
j
=
0
;
j
<
report
->
elementCount
;
j
++
)
{
if
(
report
->
Elements
[
j
].
caps
.
button
.
UsagePage
==
UsagePage
)
{
if
(
report
->
Elements
[
j
].
caps
.
button
.
IsRange
)
count
+=
(
report
->
Elements
[
j
].
caps
.
button
.
u
.
Range
.
UsageMax
-
report
->
Elements
[
j
].
caps
.
button
.
u
.
Range
.
UsageMin
)
+
1
;
else
count
++
;
}
}
report
=
HID_NEXT_REPORT
(
data
,
report
);
}
return
count
;
}
include/ddk/hidpi.h
View file @
1174fc63
...
...
@@ -142,7 +142,7 @@ NTSTATUS WINAPI HidP_GetUsages(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USH
NTSTATUS
WINAPI
HidP_GetUsageValue
(
HIDP_REPORT_TYPE
ReportType
,
USAGE
UsagePage
,
USHORT
LinkCollection
,
USAGE
Usage
,
PULONG
UsageValue
,
PHIDP_PREPARSED_DATA
PreparsedData
,
PCHAR
Report
,
ULONG
ReportLength
);
NTSTATUS
WINAPI
HidP_GetValueCaps
(
HIDP_REPORT_TYPE
ReportType
,
PHIDP_VALUE_CAPS
ValueCaps
,
PUSHORT
ValueCapsLength
,
PHIDP_PREPARSED_DATA
PreparsedData
);
NTSTATUS
WINAPI
HidP_InitializeReportForID
(
HIDP_REPORT_TYPE
ReportType
,
UCHAR
ReportID
,
PHIDP_PREPARSED_DATA
PreparsedData
,
PCHAR
Report
,
ULONG
ReportLength
);
ULONG
WINAPI
HidP_MaxUsageListLength
(
HIDP_REPORT_TYPE
ReportType
,
USAGE
UsagePage
,
PHIDP_PREPARSED_DATA
PreparsedData
);
#ifndef FACILITY_HID_ERROR_CODE
#define FACILITY_HID_ERROR_CODE 0x11
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment