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
f8ebb3ac
Commit
f8ebb3ac
authored
May 20, 2019
by
Andrew Eikum
Committed by
Alexandre Julliard
May 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Add missing padding between hatswitch and constant.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5904eb84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
bus_sdl.c
dlls/winebus.sys/bus_sdl.c
+9
-3
No files found.
dlls/winebus.sys/bus_sdl.c
View file @
f8ebb3ac
...
...
@@ -548,19 +548,23 @@ static BOOL build_mapped_report_descriptor(struct platform_private *ext)
BYTE
*
report_ptr
;
INT
i
,
descript_size
;
static
const
int
BUTTON_BIT_COUNT
=
CONTROLLER_NUM_BUTTONS
+
CONTROLLER_NUM_HATSWITCHES
*
4
;
descript_size
=
sizeof
(
REPORT_HEADER
)
+
sizeof
(
REPORT_TAIL
);
descript_size
+=
sizeof
(
CONTROLLER_AXIS
);
descript_size
+=
sizeof
(
CONTROLLER_TRIGGERS
);
descript_size
+=
sizeof
(
CONTROLLER_BUTTONS
);
descript_size
+=
sizeof
(
REPORT_HATSWITCH
);
descript_size
+=
sizeof
(
REPORT_PADDING
);
if
(
BUTTON_BIT_COUNT
%
8
!=
0
)
descript_size
+=
sizeof
(
REPORT_PADDING
);
descript_size
+=
test_haptic
(
ext
);
ext
->
axis_start
=
0
;
ext
->
button_start
=
CONTROLLER_NUM_AXES
*
sizeof
(
WORD
);
ext
->
hat_bit_offs
=
CONTROLLER_NUM_BUTTONS
;
ext
->
buffer_length
=
(
CONTROLLER_NUM_BUTTONS
+
CONTROLLER_NUM_HATSWITCHES
*
4
+
7
)
/
8
ext
->
buffer_length
=
(
BUTTON_BIT_COUNT
+
7
)
/
8
+
CONTROLLER_NUM_AXES
*
sizeof
(
WORD
)
+
2
/* unknown constant*/
;
...
...
@@ -586,6 +590,8 @@ static BOOL build_mapped_report_descriptor(struct platform_private *ext)
memcpy
(
report_ptr
,
CONTROLLER_BUTTONS
,
sizeof
(
CONTROLLER_BUTTONS
));
report_ptr
+=
sizeof
(
CONTROLLER_BUTTONS
);
report_ptr
=
add_hatswitch
(
report_ptr
,
1
);
if
(
BUTTON_BIT_COUNT
%
8
!=
0
)
report_ptr
=
add_padding_block
(
report_ptr
,
8
-
(
BUTTON_BIT_COUNT
%
8
));
/* unused bits between hatswitch and following constant */
report_ptr
=
add_padding_block
(
report_ptr
,
16
);
/* unknown constant */
report_ptr
+=
build_haptic
(
ext
,
report_ptr
);
memcpy
(
report_ptr
,
REPORT_TAIL
,
sizeof
(
REPORT_TAIL
));
...
...
@@ -606,8 +612,8 @@ static BOOL build_mapped_report_descriptor(struct platform_private *ext)
set_hat_value
(
ext
,
0
,
compose_dpad_value
(
ext
->
sdl_controller
));
/* unknown constant */
ext
->
report_buffer
[
1
2
]
=
0x89
;
ext
->
report_buffer
[
1
3
]
=
0xc5
;
ext
->
report_buffer
[
1
4
]
=
0x89
;
ext
->
report_buffer
[
1
5
]
=
0xc5
;
return
TRUE
;
}
...
...
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