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
d5e9ceda
Commit
d5e9ceda
authored
Aug 28, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
Aug 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: BuildActionMap should not fail if mapping has no pre-stored settings.
parent
851d38c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
device.c
dlls/dinput/device.c
+4
-3
device.c
dlls/dinput8/tests/device.c
+4
-4
No files found.
dlls/dinput/device.c
View file @
d5e9ceda
...
...
@@ -674,7 +674,7 @@ static BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMAT
HKEY
hkey
;
WCHAR
*
guid_str
;
DIDEVICEINSTANCEW
didev
;
int
i
;
int
i
,
mapped
=
0
;
didev
.
dwSize
=
sizeof
(
didev
);
IDirectInputDevice8_GetDeviceInfo
(
&
This
->
IDirectInputDevice8W_iface
,
&
didev
);
...
...
@@ -703,14 +703,15 @@ static BOOL load_mapping_settings(IDirectInputDeviceImpl *This, LPDIACTIONFORMAT
{
lpdiaf
->
rgoAction
[
i
].
dwObjID
=
id
;
lpdiaf
->
rgoAction
[
i
].
guidInstance
=
didev
.
guidInstance
;
lpdiaf
->
rgoAction
[
i
].
dwHow
=
DIAH_USERCONFIG
;
lpdiaf
->
rgoAction
[
i
].
dwHow
=
DIAH_DEFAULT
;
mapped
+=
1
;
}
}
RegCloseKey
(
hkey
);
CoTaskMemFree
(
guid_str
);
return
TRUE
;
return
mapped
>
0
;
}
HRESULT
_build_action_map
(
LPDIRECTINPUTDEVICE8W
iface
,
LPDIACTIONFORMATW
lpdiaf
,
LPCWSTR
lpszUserName
,
DWORD
dwFlags
,
DWORD
devMask
,
LPCDIDATAFORMAT
df
)
...
...
dlls/dinput8/tests/device.c
View file @
d5e9ceda
...
...
@@ -447,13 +447,13 @@ static void test_save_settings(void)
hr
=
IDirectInputDevice8_BuildActionMap
(
pKey
,
&
af
,
NULL
,
0
);
ok
(
SUCCEEDED
(
hr
),
"BuildActionMap failed hr=%08x
\n
"
,
hr
);
todo_wine
ok
(
results
[
0
]
==
af
.
rgoAction
[
0
].
dwObjID
,
ok
(
results
[
0
]
==
af
.
rgoAction
[
0
].
dwObjID
,
"Mapped incorrectly expected: 0x%08x got: 0x%08x
\n
"
,
results
[
0
],
af
.
rgoAction
[
0
].
dwObjID
);
todo_wine
ok
(
IsEqualGUID
(
&
GUID_SysKeyboard
,
&
af
.
rgoAction
[
0
].
guidInstance
),
"Action should be mapped to keyboard
\n
"
);
ok
(
IsEqualGUID
(
&
GUID_SysKeyboard
,
&
af
.
rgoAction
[
0
].
guidInstance
),
"Action should be mapped to keyboard
\n
"
);
todo_wine
ok
(
results
[
1
]
==
af
.
rgoAction
[
1
].
dwObjID
,
ok
(
results
[
1
]
==
af
.
rgoAction
[
1
].
dwObjID
,
"Mapped incorrectly expected: 0x%08x got: 0x%08x
\n
"
,
results
[
1
],
af
.
rgoAction
[
1
].
dwObjID
);
todo_wine
ok
(
IsEqualGUID
(
&
GUID_SysKeyboard
,
&
af
.
rgoAction
[
1
].
guidInstance
),
"Action should be mapped to keyboard
\n
"
);
ok
(
IsEqualGUID
(
&
GUID_SysKeyboard
,
&
af
.
rgoAction
[
1
].
guidInstance
),
"Action should be mapped to keyboard
\n
"
);
af
.
guidActionMap
=
mapping_guid
;
/* Hard case. Customized mapping, save, ask for previous map and read it back */
...
...
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