mirror of
https://github.com/reactos/wine.git
synced 2025-02-12 07:32:23 +00:00
dinput: Use BOOL type where appropriate.
This commit is contained in:
parent
c002197692
commit
25f3356906
@ -719,8 +719,8 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
|
|||||||
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
|
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
|
||||||
WCHAR username[MAX_PATH];
|
WCHAR username[MAX_PATH];
|
||||||
DWORD username_size = MAX_PATH;
|
DWORD username_size = MAX_PATH;
|
||||||
int i, has_actions = 0;
|
int i;
|
||||||
BOOL load_success = FALSE;
|
BOOL load_success = FALSE, has_actions = FALSE;
|
||||||
|
|
||||||
/* Unless asked the contrary by these flags, try to load a previous mapping */
|
/* Unless asked the contrary by these flags, try to load a previous mapping */
|
||||||
if (!(dwFlags & DIDBAM_HWDEFAULTS))
|
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].dwObjID = obj_id;
|
||||||
lpdiaf->rgoAction[i].guidInstance = This->guid;
|
lpdiaf->rgoAction[i].guidInstance = This->guid;
|
||||||
lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT;
|
lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT;
|
||||||
has_actions = 1;
|
has_actions = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!(dwFlags & DIDBAM_PRESERVE))
|
else if (!(dwFlags & DIDBAM_PRESERVE))
|
||||||
|
@ -708,7 +708,7 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
|
|||||||
{
|
{
|
||||||
JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
|
JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
int has_actions = 0;
|
BOOL has_actions = FALSE;
|
||||||
DWORD object_types[] = { DIDFT_AXIS, DIDFT_BUTTON };
|
DWORD object_types[] = { DIDFT_AXIS, DIDFT_BUTTON };
|
||||||
DWORD type_map[] = { DIDFT_RELAXIS, DIDFT_PSHBUTTON };
|
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].guidInstance = This->base.guid;
|
||||||
lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT;
|
lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT;
|
||||||
|
|
||||||
has_actions = 1;
|
has_actions = TRUE;
|
||||||
|
|
||||||
/* No need to try other types if the action was already mapped */
|
/* No need to try other types if the action was already mapped */
|
||||||
break;
|
break;
|
||||||
|
@ -97,7 +97,7 @@ struct JoyDev {
|
|||||||
char *name;
|
char *name;
|
||||||
GUID guid;
|
GUID guid;
|
||||||
|
|
||||||
int has_ff;
|
BOOL has_ff;
|
||||||
int num_effects;
|
int num_effects;
|
||||||
|
|
||||||
/* data returned by EVIOCGBIT for caps, EV_ABS, EV_KEY, and EV_FF */
|
/* 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)
|
joydev.num_effects > 0)
|
||||||
{
|
{
|
||||||
TRACE(" ... with force feedback\n");
|
TRACE(" ... with force feedback\n");
|
||||||
joydev.has_ff = 1;
|
joydev.has_ff = TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -841,13 +841,13 @@ static const char *osx_ff_axis_name(UInt8 axis)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int osx_axis_has_ff(FFCAPABILITIES *ffcaps, UInt8 axis)
|
static BOOL osx_axis_has_ff(FFCAPABILITIES *ffcaps, UInt8 axis)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < ffcaps->numFfAxes; ++i)
|
for(i = 0; i < ffcaps->numFfAxes; ++i)
|
||||||
if(ffcaps->ffAxes[i] == axis)
|
if(ffcaps->ffAxes[i] == axis)
|
||||||
return 1;
|
return TRUE;
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput,
|
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++)
|
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])
|
switch (axis_map[i])
|
||||||
{
|
{
|
||||||
case kHIDUsage_GD_X:
|
case kHIDUsage_GD_X:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user