Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
146176cc
Commit
146176cc
authored
13 years ago
by
Lucas Fialho Zawacki
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
dinput: Correct wrong loop delimiter in diactionformat_priority.
parent
b01ce6b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/dinput/dinput_main.c
+9
-9
9 additions, 9 deletions
dlls/dinput/dinput_main.c
with
9 additions
and
9 deletions
dlls/dinput/dinput_main.c
+
9
−
9
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
->
dwAction
Size
;
i
++
)
for
(
i
=
0
;
i
<
lpdiaf
->
dw
Num
Action
s
;
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
->
dwAction
Size
;
i
++
)
for
(
i
=
0
;
i
<
lpdiaf
->
dw
Num
Action
s
;
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment