Commit 25f33569 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

dinput: Use BOOL type where appropriate.

parent c0021976
......@@ -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))
......
......@@ -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;
......
......@@ -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
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment