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
25f33569
Commit
25f33569
authored
Oct 04, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Use BOOL type where appropriate.
parent
c0021976
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
device.c
dlls/dinput/device.c
+3
-3
joystick.c
dlls/dinput/joystick.c
+2
-2
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+2
-2
joystick_osx.c
dlls/dinput/joystick_osx.c
+5
-4
No files found.
dlls/dinput/device.c
View file @
25f33569
...
...
@@ -719,8 +719,8 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
IDirectInputDeviceImpl
*
This
=
impl_from_IDirectInputDevice8W
(
iface
);
WCHAR
username
[
MAX_PATH
];
DWORD
username_size
=
MAX_PATH
;
int
i
,
has_actions
=
0
;
BOOL
load_success
=
FALSE
;
int
i
;
BOOL
load_success
=
FALSE
,
has_actions
=
FALSE
;
/* Unless asked the contrary by these flags, try to load a previous mapping */
if
(
!
(
dwFlags
&
DIDBAM_HWDEFAULTS
))
...
...
@@ -760,7 +760,7 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
lpdiaf
->
rgoAction
[
i
].
dwObjID
=
obj_id
;
lpdiaf
->
rgoAction
[
i
].
guidInstance
=
This
->
guid
;
lpdiaf
->
rgoAction
[
i
].
dwHow
=
DIAH_DEFAULT
;
has_actions
=
1
;
has_actions
=
TRUE
;
}
}
else
if
(
!
(
dwFlags
&
DIDBAM_PRESERVE
))
...
...
dlls/dinput/joystick.c
View file @
25f33569
...
...
@@ -708,7 +708,7 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
{
JoystickGenericImpl
*
This
=
impl_from_IDirectInputDevice8W
(
iface
);
unsigned
int
i
,
j
;
int
has_actions
=
0
;
BOOL
has_actions
=
FALSE
;
DWORD
object_types
[]
=
{
DIDFT_AXIS
,
DIDFT_BUTTON
};
DWORD
type_map
[]
=
{
DIDFT_RELAXIS
,
DIDFT_PSHBUTTON
};
...
...
@@ -739,7 +739,7 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
lpdiaf
->
rgoAction
[
i
].
guidInstance
=
This
->
base
.
guid
;
lpdiaf
->
rgoAction
[
i
].
dwHow
=
DIAH_DEFAULT
;
has_actions
=
1
;
has_actions
=
TRUE
;
/* No need to try other types if the action was already mapped */
break
;
...
...
dlls/dinput/joystick_linuxinput.c
View file @
25f33569
...
...
@@ -97,7 +97,7 @@ struct JoyDev {
char
*
name
;
GUID
guid
;
int
has_ff
;
BOOL
has_ff
;
int
num_effects
;
/* data returned by EVIOCGBIT for caps, EV_ABS, EV_KEY, and EV_FF */
...
...
@@ -275,7 +275,7 @@ static void find_joydevs(void)
joydev
.
num_effects
>
0
)
{
TRACE
(
" ... with force feedback
\n
"
);
joydev
.
has_ff
=
1
;
joydev
.
has_ff
=
TRUE
;
}
#endif
...
...
dlls/dinput/joystick_osx.c
View file @
25f33569
...
...
@@ -841,13 +841,13 @@ static const char *osx_ff_axis_name(UInt8 axis)
return
ret
;
}
static
int
osx_axis_has_ff
(
FFCAPABILITIES
*
ffcaps
,
UInt8
axis
)
static
BOOL
osx_axis_has_ff
(
FFCAPABILITIES
*
ffcaps
,
UInt8
axis
)
{
int
i
;
for
(
i
=
0
;
i
<
ffcaps
->
numFfAxes
;
++
i
)
if
(
ffcaps
->
ffAxes
[
i
]
==
axis
)
return
1
;
return
0
;
return
TRUE
;
return
FALSE
;
}
static
HRESULT
alloc_device
(
REFGUID
rguid
,
IDirectInputImpl
*
dinput
,
...
...
@@ -948,7 +948,8 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput,
for
(
i
=
0
;
i
<
newDevice
->
generic
.
devcaps
.
dwAxes
;
i
++
)
{
int
wine_obj
=
-
1
,
has_ff
=
0
;
int
wine_obj
=
-
1
;
BOOL
has_ff
=
FALSE
;
switch
(
axis_map
[
i
])
{
case
kHIDUsage_GD_X
:
...
...
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