Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
001b7077
Commit
001b7077
authored
Jun 04, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Add some buttons to HID keyboard input report.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
318e5fed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
controller.h
dlls/winebus.sys/controller.h
+2
-1
main.c
dlls/winebus.sys/main.c
+5
-3
No files found.
dlls/winebus.sys/controller.h
View file @
001b7077
...
@@ -33,7 +33,7 @@ static const BYTE REPORT_HEADER[] = {
...
@@ -33,7 +33,7 @@ static const BYTE REPORT_HEADER[] = {
#define IDX_HEADER_USAGE 3
#define IDX_HEADER_USAGE 3
static
const
BYTE
REPORT_BUTTONS
[]
=
{
static
const
BYTE
REPORT_BUTTONS
[]
=
{
USAGE_PAGE
(
1
,
HID_USAGE_PAGE_BUTTON
),
USAGE_PAGE
(
1
,
/* placeholder */
HID_USAGE_PAGE_BUTTON
),
USAGE_MINIMUM
(
1
,
/* placeholder */
1
),
USAGE_MINIMUM
(
1
,
/* placeholder */
1
),
USAGE_MAXIMUM
(
1
,
/* placeholder */
3
),
USAGE_MAXIMUM
(
1
,
/* placeholder */
3
),
LOGICAL_MINIMUM
(
1
,
0
),
LOGICAL_MINIMUM
(
1
,
0
),
...
@@ -44,6 +44,7 @@ static const BYTE REPORT_BUTTONS[] = {
...
@@ -44,6 +44,7 @@ static const BYTE REPORT_BUTTONS[] = {
REPORT_SIZE
(
1
,
1
),
REPORT_SIZE
(
1
,
1
),
INPUT
(
1
,
Data
|
Var
|
Abs
),
INPUT
(
1
,
Data
|
Var
|
Abs
),
};
};
#define IDX_BUTTON_USAGE_PAGE 1
#define IDX_BUTTON_MIN_USAGE 3
#define IDX_BUTTON_MIN_USAGE 3
#define IDX_BUTTON_MAX_USAGE 5
#define IDX_BUTTON_MAX_USAGE 5
#define IDX_BUTTON_COUNT 15
#define IDX_BUTTON_COUNT 15
...
...
dlls/winebus.sys/main.c
View file @
001b7077
...
@@ -546,12 +546,14 @@ static NTSTATUS keyboard_get_reportdescriptor(DEVICE_OBJECT *device, BYTE *buffe
...
@@ -546,12 +546,14 @@ static NTSTATUS keyboard_get_reportdescriptor(DEVICE_OBJECT *device, BYTE *buffe
{
{
TRACE
(
"buffer %p, length %u.
\n
"
,
buffer
,
length
);
TRACE
(
"buffer %p, length %u.
\n
"
,
buffer
,
length
);
*
ret_length
=
sizeof
(
REPORT_HEADER
)
+
sizeof
(
REPORT_TAIL
);
*
ret_length
=
sizeof
(
REPORT_HEADER
)
+
sizeof
(
REPORT_
BUTTONS
)
+
sizeof
(
REPORT_
TAIL
);
if
(
length
<
sizeof
(
REPORT_HEADER
)
+
sizeof
(
REPORT_TAIL
))
if
(
length
<
sizeof
(
REPORT_HEADER
)
+
sizeof
(
REPORT_
BUTTONS
)
+
sizeof
(
REPORT_
TAIL
))
return
STATUS_BUFFER_TOO_SMALL
;
return
STATUS_BUFFER_TOO_SMALL
;
memcpy
(
buffer
,
REPORT_HEADER
,
sizeof
(
REPORT_HEADER
));
memcpy
(
buffer
,
REPORT_HEADER
,
sizeof
(
REPORT_HEADER
));
memcpy
(
buffer
+
sizeof
(
REPORT_HEADER
),
REPORT_TAIL
,
sizeof
(
REPORT_TAIL
));
add_button_block
(
buffer
+
sizeof
(
REPORT_HEADER
),
0
,
101
);
buffer
[
sizeof
(
REPORT_HEADER
)
+
IDX_BUTTON_USAGE_PAGE
]
=
HID_USAGE_PAGE_KEYBOARD
;
memcpy
(
buffer
+
sizeof
(
REPORT_HEADER
)
+
sizeof
(
REPORT_BUTTONS
),
REPORT_TAIL
,
sizeof
(
REPORT_TAIL
));
buffer
[
IDX_HEADER_PAGE
]
=
HID_USAGE_PAGE_GENERIC
;
buffer
[
IDX_HEADER_PAGE
]
=
HID_USAGE_PAGE_GENERIC
;
buffer
[
IDX_HEADER_USAGE
]
=
HID_USAGE_GENERIC_KEYBOARD
;
buffer
[
IDX_HEADER_USAGE
]
=
HID_USAGE_GENERIC_KEYBOARD
;
...
...
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