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
50690e08
Commit
50690e08
authored
Jul 22, 2022
by
Arkadiusz Hiler
Committed by
Alexandre Julliard
Jul 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Enumerate user format object forwards.
It's important for the default broken formats like c_dfDIJoystick2 which have multiple sets of sliders defined with the same offsets.
parent
76a1fd28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
device.c
dlls/dinput/device.c
+8
-10
No files found.
dlls/dinput/device.c
View file @
50690e08
...
...
@@ -880,25 +880,23 @@ static HRESULT WINAPI dinput_device_EnumObjects( IDirectInputDevice8W *iface,
static
HRESULT
enum_object_filter_init
(
struct
dinput_device
*
impl
,
DIPROPHEADER
*
filter
)
{
DI
DATAFORMAT
*
device_format
=
&
impl
->
device_format
,
*
user_format
=
&
impl
->
user_format
;
D
IOBJECTDATAFORMAT
*
device_obj
,
*
user_obj
;
DI
OBJECTDATAFORMAT
*
user_objs
=
impl
->
user_format
.
rgodf
;
D
WORD
i
,
count
=
impl
->
device_format
.
dwNumObjs
;
if
(
filter
->
dwHow
>
DIPH_BYUSAGE
)
return
DIERR_INVALIDPARAM
;
if
(
filter
->
dwHow
==
DIPH_BYUSAGE
&&
!
(
impl
->
instance
.
dwDevType
&
DIDEVTYPE_HID
))
return
DIERR_UNSUPPORTED
;
if
(
filter
->
dwHow
!=
DIPH_BYOFFSET
)
return
DI_OK
;
if
(
!
user_
format
->
rgodf
)
return
DIERR_NOTFOUND
;
if
(
!
user_
objs
)
return
DIERR_NOTFOUND
;
user_obj
=
user_format
->
rgodf
+
device_format
->
dwNumObjs
;
device_obj
=
device_format
->
rgodf
+
device_format
->
dwNumObjs
;
while
(
user_obj
--
>
user_format
->
rgodf
&&
device_obj
--
>
device_format
->
rgodf
)
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
!
user_obj
->
dwType
)
continue
;
if
(
user_obj
->
dwOfs
==
filter
->
dwObj
)
break
;
if
(
!
user_obj
s
[
i
].
dwType
)
continue
;
if
(
user_obj
s
[
i
].
dwOfs
==
filter
->
dwObj
)
break
;
}
if
(
user_obj
<
user_format
->
rgodf
)
return
DIERR_NOTFOUND
;
if
(
i
==
count
)
return
DIERR_NOTFOUND
;
filter
->
dwObj
=
device_obj
->
dwOfs
;
filter
->
dwObj
=
impl
->
device_format
.
rgodf
[
i
].
dwOfs
;
return
DI_OK
;
}
...
...
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