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
cb7bb228
Commit
cb7bb228
authored
May 19, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Avoid remapping already mapped objects in BuildActionMap.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54917
parent
839a5379
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
device.c
dlls/dinput/device.c
+18
-0
No files found.
dlls/dinput/device.c
View file @
cb7bb228
...
...
@@ -1866,6 +1866,23 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
if
(
!
(
mapped
=
calloc
(
impl
->
device_format
.
dwNumObjs
,
sizeof
(
*
mapped
)
)))
return
DIERR_OUTOFMEMORY
;
/* check already mapped objects */
action_end
=
format
->
rgoAction
+
format
->
dwNumActions
;
for
(
action
=
format
->
rgoAction
;
action
<
action_end
;
action
++
)
{
if
(
!
action
->
dwHow
||
!
action
->
dwObjID
)
continue
;
if
(
!
IsEqualGUID
(
&
action
->
guidInstance
,
&
impl
->
guid
))
continue
;
object_end
=
impl
->
device_format
.
rgodf
+
impl
->
device_format
.
dwNumObjs
;
for
(
object
=
impl
->
device_format
.
rgodf
;
object
<
object_end
;
object
++
)
{
if
(
action
->
dwObjID
!=
object
->
dwType
)
continue
;
mapped
[
object
-
impl
->
device_format
.
rgodf
]
=
TRUE
;
break
;
}
}
/* map any unmapped priority 1 objects */
action_end
=
format
->
rgoAction
+
format
->
dwNumActions
;
for
(
action
=
format
->
rgoAction
;
action
<
action_end
;
action
++
)
{
...
...
@@ -1886,6 +1903,7 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
}
}
/* map any unmapped priority 2 objects */
for
(
action
=
format
->
rgoAction
;
action
<
action_end
;
action
++
)
{
if
(
action
->
dwHow
||
(
action
->
dwFlags
&
DIA_APPNOMAP
))
continue
;
/* already mapped */
...
...
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