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
18b5f795
Commit
18b5f795
authored
Mar 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Load action map from registry before resetting guid.
parent
2da8f5d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
device.c
dlls/dinput/device.c
+11
-9
No files found.
dlls/dinput/device.c
View file @
18b5f795
...
...
@@ -1812,7 +1812,6 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
DIACTIONW
*
action
,
*
action_end
;
DWORD
i
,
username_len
=
MAX_PATH
;
WCHAR
username_buf
[
MAX_PATH
];
BOOL
load_success
=
FALSE
;
BOOL
*
mapped
;
TRACE
(
"iface %p, format %p, username %s, flags %#lx
\n
"
,
iface
,
format
,
...
...
@@ -1840,12 +1839,7 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
{
if
(
!
action
->
dwSemantic
)
return
DIERR_INVALIDPARAM
;
if
(
action
->
dwFlags
&
DIA_APPMAPPED
)
action
->
dwHow
=
DIAH_APPREQUESTED
;
else
if
(
action
->
dwFlags
&
DIA_APPNOMAP
)
continue
;
else
{
action
->
dwHow
=
0
;
action
->
guidInstance
=
GUID_NULL
;
}
else
action
->
dwHow
=
0
;
}
/* Unless asked the contrary by these flags, try to load a previous mapping */
...
...
@@ -1854,10 +1848,18 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
/* Retrieve logged user name if necessary */
if
(
username
==
NULL
)
GetUserNameW
(
username_buf
,
&
username_len
);
else
lstrcpynW
(
username_buf
,
username
,
MAX_PATH
);
load_success
=
load_mapping_settings
(
impl
,
format
,
username_buf
);
load_mapping_settings
(
impl
,
format
,
username_buf
);
}
action_end
=
format
->
rgoAction
+
format
->
dwNumActions
;
for
(
action
=
format
->
rgoAction
;
action
<
action_end
;
action
++
)
{
if
(
action
->
dwHow
==
DIAH_APPREQUESTED
||
action
->
dwHow
==
DIAH_USERCONFIG
)
continue
;
if
(
action
->
dwFlags
&
DIA_APPNOMAP
)
continue
;
action
->
guidInstance
=
GUID_NULL
;
action
->
dwHow
=
0
;
}
if
(
load_success
)
return
DI_OK
;
if
(
!
(
mapped
=
calloc
(
impl
->
device_format
.
dwNumObjs
,
sizeof
(
*
mapped
)
)))
return
DIERR_OUTOFMEMORY
;
action_end
=
format
->
rgoAction
+
format
->
dwNumActions
;
...
...
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