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
bbdec47b
Commit
bbdec47b
authored
Nov 15, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Fix incorrect hid_device_set index check.
Instead of checking it in set_report_from_joystick_event.
parent
f79d4343
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
bus_sdl.c
dlls/winebus.sys/bus_sdl.c
+2
-4
hid.c
dlls/winebus.sys/hid.c
+3
-3
No files found.
dlls/winebus.sys/bus_sdl.c
View file @
bbdec47b
...
...
@@ -841,8 +841,7 @@ static BOOL set_report_from_joystick_event(struct sdl_device *impl, SDL_Event *e
{
SDL_JoyAxisEvent
*
ie
=
&
event
->
jaxis
;
if
(
ie
->
axis
>=
ARRAY_SIZE
(
absolute_axis_usages
))
break
;
hid_device_set_abs_axis
(
iface
,
ie
->
axis
,
ie
->
value
);
if
(
!
hid_device_set_abs_axis
(
iface
,
ie
->
axis
,
ie
->
value
))
break
;
bus_event_queue_input_report
(
&
event_queue
,
iface
,
state
->
report_buf
,
state
->
report_len
);
break
;
}
...
...
@@ -850,8 +849,7 @@ static BOOL set_report_from_joystick_event(struct sdl_device *impl, SDL_Event *e
{
SDL_JoyBallEvent
*
ie
=
&
event
->
jball
;
if
(
ie
->
ball
>=
ARRAY_SIZE
(
relative_axis_usages
)
/
2
)
break
;
hid_device_set_rel_axis
(
iface
,
2
*
ie
->
ball
,
ie
->
xrel
);
if
(
!
hid_device_set_rel_axis
(
iface
,
2
*
ie
->
ball
,
ie
->
xrel
))
break
;
hid_device_set_rel_axis
(
iface
,
2
*
ie
->
ball
+
1
,
ie
->
yrel
);
bus_event_queue_input_report
(
&
event_queue
,
iface
,
state
->
report_buf
,
state
->
report_len
);
break
;
...
...
dlls/winebus.sys/hid.c
View file @
bbdec47b
...
...
@@ -1376,7 +1376,7 @@ BOOL hid_device_set_abs_axis(struct unix_device *iface, ULONG index, LONG value)
{
struct
hid_device_state
*
state
=
&
iface
->
hid_device_state
;
ULONG
offset
=
state
->
abs_axis_start
+
index
*
4
;
if
(
index
>
state
->
abs_axis_count
)
return
FALSE
;
if
(
index
>
=
state
->
abs_axis_count
)
return
FALSE
;
*
(
ULONG
*
)(
state
->
report_buf
+
offset
)
=
LE_ULONG
(
value
);
return
TRUE
;
}
...
...
@@ -1385,7 +1385,7 @@ BOOL hid_device_set_rel_axis(struct unix_device *iface, ULONG index, LONG value)
{
struct
hid_device_state
*
state
=
&
iface
->
hid_device_state
;
ULONG
offset
=
state
->
rel_axis_start
+
index
*
4
;
if
(
index
>
state
->
rel_axis_count
)
return
FALSE
;
if
(
index
>
=
state
->
rel_axis_count
)
return
FALSE
;
*
(
ULONG
*
)(
state
->
report_buf
+
offset
)
=
LE_ULONG
(
value
);
return
TRUE
;
}
...
...
@@ -1395,7 +1395,7 @@ BOOL hid_device_set_button(struct unix_device *iface, ULONG index, BOOL is_set)
struct
hid_device_state
*
state
=
&
iface
->
hid_device_state
;
ULONG
offset
=
state
->
button_start
+
(
index
/
8
);
BYTE
mask
=
(
1
<<
(
index
%
8
));
if
(
index
>
state
->
button_count
)
return
FALSE
;
if
(
index
>
=
state
->
button_count
)
return
FALSE
;
if
(
is_set
)
state
->
report_buf
[
offset
]
|=
mask
;
else
state
->
report_buf
[
offset
]
&=
~
mask
;
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