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
146176cc
Commit
146176cc
authored
Mar 24, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Correct wrong loop delimiter in diactionformat_priority.
parent
b01ce6b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
dinput_main.c
dlls/dinput/dinput_main.c
+9
-9
No files found.
dlls/dinput/dinput_main.c
View file @
146176cc
...
...
@@ -308,32 +308,32 @@ void _copy_diactionformatWtoA(LPDIACTIONFORMATA to, LPDIACTIONFORMATW from)
}
}
/*
_
diactionformat_priority
/* diactionformat_priority
*
* Given a DIACTIONFORMAT structure and a DI genre, returns the enumeration
* priority. Joysticks should pass the game genre, and mouse or keyboard their
* respective DI*_MASK
*/
static
DWORD
_
diactionformat_priorityA
(
LPDIACTIONFORMATA
lpdiaf
,
DWORD
genre
)
static
DWORD
diactionformat_priorityA
(
LPDIACTIONFORMATA
lpdiaf
,
DWORD
genre
)
{
int
i
;
DWORD
priorityFlags
=
0
;
/* If there's at least one action for the device it's priority 1 */
for
(
i
=
0
;
i
<
lpdiaf
->
dw
ActionSize
;
i
++
)
for
(
i
=
0
;
i
<
lpdiaf
->
dw
NumActions
;
i
++
)
if
((
lpdiaf
->
rgoAction
[
i
].
dwSemantic
&
genre
)
==
genre
)
priorityFlags
|=
DIEDBS_MAPPEDPRI1
;
return
priorityFlags
;
}
static
DWORD
_
diactionformat_priorityW
(
LPDIACTIONFORMATW
lpdiaf
,
DWORD
genre
)
static
DWORD
diactionformat_priorityW
(
LPDIACTIONFORMATW
lpdiaf
,
DWORD
genre
)
{
int
i
;
DWORD
priorityFlags
=
0
;
/* If there's at least one action for the device it's priority 1 */
for
(
i
=
0
;
i
<
lpdiaf
->
dw
ActionSize
;
i
++
)
for
(
i
=
0
;
i
<
lpdiaf
->
dw
NumActions
;
i
++
)
if
((
lpdiaf
->
rgoAction
[
i
].
dwSemantic
&
genre
)
==
genre
)
priorityFlags
|=
DIEDBS_MAPPEDPRI1
;
...
...
@@ -913,7 +913,7 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics(
{
TRACE
(
" - checking device %u ('%s')
\n
"
,
i
,
dinput_devices
[
i
]
->
name
);
callbackFlags
=
_
diactionformat_priorityA
(
lpdiActionFormat
,
lpdiActionFormat
->
dwGenre
);
callbackFlags
=
diactionformat_priorityA
(
lpdiActionFormat
,
lpdiActionFormat
->
dwGenre
);
/* Default behavior is to enumerate attached game controllers */
enumSuccess
=
dinput_devices
[
i
]
->
enum_deviceA
(
DI8DEVCLASS_GAMECTRL
,
DIEDFL_ATTACHEDONLY
|
dwFlags
,
&
didevi
,
This
->
dwVersion
,
j
);
if
(
enumSuccess
)
...
...
@@ -931,7 +931,7 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics(
/* Enumerate keyboard and mouse */
for
(
i
=
0
;
i
<
sizeof
(
guids
)
/
sizeof
(
guids
[
0
]);
i
++
)
{
callbackFlags
=
_
diactionformat_priorityA
(
lpdiActionFormat
,
actionMasks
[
i
]);
callbackFlags
=
diactionformat_priorityA
(
lpdiActionFormat
,
actionMasks
[
i
]);
IDirectInput_CreateDevice
(
iface
,
guids
[
i
],
&
lpdid
,
NULL
);
IDirectInputDevice_GetDeviceInfo
(
lpdid
,
&
didevi
);
...
...
@@ -973,7 +973,7 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics(
{
TRACE
(
" - checking device %u ('%s')
\n
"
,
i
,
dinput_devices
[
i
]
->
name
);
callbackFlags
=
_
diactionformat_priorityW
(
lpdiActionFormat
,
lpdiActionFormat
->
dwGenre
);
callbackFlags
=
diactionformat_priorityW
(
lpdiActionFormat
,
lpdiActionFormat
->
dwGenre
);
/* Default behavior is to enumerate attached game controllers */
enumSuccess
=
dinput_devices
[
i
]
->
enum_deviceW
(
DI8DEVCLASS_GAMECTRL
,
DIEDFL_ATTACHEDONLY
|
dwFlags
,
&
didevi
,
This
->
dwVersion
,
j
);
if
(
enumSuccess
)
...
...
@@ -991,7 +991,7 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics(
/* Enumerate keyboard and mouse */
for
(
i
=
0
;
i
<
sizeof
(
guids
)
/
sizeof
(
guids
[
0
]);
i
++
)
{
callbackFlags
=
_
diactionformat_priorityW
(
lpdiActionFormat
,
actionMasks
[
i
]);
callbackFlags
=
diactionformat_priorityW
(
lpdiActionFormat
,
actionMasks
[
i
]);
IDirectInput_CreateDevice
(
iface
,
guids
[
i
],
&
lpdid
,
NULL
);
IDirectInputDevice_GetDeviceInfo
(
lpdid
,
&
didevi
);
...
...
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