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
df90c379
Commit
df90c379
authored
Mar 20, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Use 4 bytes for every object user state in SetActionMap.
parent
8e069f0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
device.c
dlls/dinput/device.c
+1
-3
joystick8.c
dlls/dinput/tests/joystick8.c
+4
-4
No files found.
dlls/dinput/device.c
View file @
df90c379
...
...
@@ -2052,7 +2052,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
action_map
=
malloc
(
sizeof
(
ActionMap
)
*
num_actions
);
for
(
i
=
0
;
i
<
format
->
dwNumActions
;
i
++
)
for
(
i
=
0
;
i
<
format
->
dwNumActions
;
i
++
,
offset
+=
sizeof
(
ULONG
)
)
{
if
(
IsEqualGUID
(
&
impl
->
guid
,
&
format
->
rgoAction
[
i
].
guidInstance
))
{
...
...
@@ -2070,9 +2070,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
action_map
[
action
].
uAppData
=
format
->
rgoAction
[
i
].
uAppData
;
action_map
[
action
].
offset
=
offset
;
obj_df
[
action
].
dwOfs
=
offset
;
offset
+=
(
type
&
DIDFT_BUTTON
)
?
1
:
4
;
data_format
.
dwNumObjs
++
;
action
++
;
}
}
...
...
dlls/dinput/tests/joystick8.c
View file @
df90c379
...
...
@@ -1046,13 +1046,13 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
hr
=
IDirectInputDevice8_GetDeviceState
(
device
,
sizeof
(
state
),
state
);
ok
(
hr
==
DI_OK
,
"GetDeviceState returned: %#lx
\n
"
,
hr
);
todo_wine
todo_wine
_if
(
i
>
5
)
ok
(
state
[
0
]
==
expect_state
[
i
][
0
],
"got state[0] %+ld
\n
"
,
state
[
0
]
);
todo_wine_if
(
i
!=
2
)
todo_wine_if
(
i
==
2
||
i
>
4
)
ok
(
state
[
1
]
==
expect_state
[
i
][
1
],
"got state[1] %+ld
\n
"
,
state
[
1
]
);
todo_wine_if
(
expect_state
[
i
][
2
]
)
ok
(
state
[
2
]
==
expect_state
[
i
][
2
],
"got state[2] %+ld
\n
"
,
state
[
2
]
);
todo_wine_if
(
expect_state
[
i
][
3
]
)
todo_wine_if
(
i
>
5
)
ok
(
state
[
3
]
==
expect_state
[
i
][
3
],
"got state[3] %+ld
\n
"
,
state
[
3
]
);
todo_wine_if
(
expect_state
[
i
][
4
]
)
ok
(
state
[
4
]
==
expect_state
[
i
][
4
],
"got state[4] %+ld
\n
"
,
state
[
4
]
);
...
...
@@ -1082,7 +1082,7 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
while
(
res
--
)
{
winetest_push_context
(
"%lu"
,
res
);
todo_wine
todo_wine
_if
(
res
!=
1
&&
res
!=
4
)
check_member
(
objdata
[
res
],
expect_objdata
[
res
],
"%#lx"
,
dwOfs
);
todo_wine_if
(
res
==
0
||
res
==
3
||
res
==
6
)
ok
(
objdata
[
res
].
dwData
==
expect_objdata
[
res
].
dwData
||
...
...
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