mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
dinput: Use the internal vtable for GetEffectInfo.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
713d71c187
commit
f54210590f
5 changed files with 18 additions and 16 deletions
|
@ -1732,14 +1732,18 @@ HRESULT WINAPI IDirectInputDevice2WImpl_EnumEffects( IDirectInputDevice8W *iface
|
|||
return DI_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectInputDevice2WImpl_GetEffectInfo(
|
||||
LPDIRECTINPUTDEVICE8W iface,
|
||||
LPDIEFFECTINFOW lpdei,
|
||||
REFGUID rguid)
|
||||
HRESULT WINAPI IDirectInputDevice2WImpl_GetEffectInfo( IDirectInputDevice8W *iface, DIEFFECTINFOW *info,
|
||||
const GUID *guid )
|
||||
{
|
||||
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
|
||||
FIXME("(%p)->(%p,%s): stub!\n", This, lpdei, debugstr_guid(rguid));
|
||||
return DI_OK;
|
||||
IDirectInputDeviceImpl *impl = impl_from_IDirectInputDevice8W( iface );
|
||||
|
||||
TRACE( "iface %p, info %p, guid %s.\n", iface, info, debugstr_guid( guid ) );
|
||||
|
||||
if (!info) return E_POINTER;
|
||||
if (info->dwSize != sizeof(DIEFFECTINFOW)) return DIERR_INVALIDPARAM;
|
||||
if (!(impl->caps.dwFlags & DIDC_FORCEFEEDBACK)) return DIERR_DEVICENOTREG;
|
||||
if (!impl->vtbl->get_effect_info) return DIERR_UNSUPPORTED;
|
||||
return impl->vtbl->get_effect_info( iface, info, guid );
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectInputDevice2WImpl_GetForceFeedbackState(LPDIRECTINPUTDEVICE8W iface, LPDWORD pdwOut)
|
||||
|
|
|
@ -68,6 +68,7 @@ struct dinput_device_vtbl
|
|||
DIDEVICEOBJECTINSTANCEW *instance );
|
||||
HRESULT (*set_property)( IDirectInputDevice8W *iface, DWORD property, const DIPROPHEADER *header,
|
||||
const DIDEVICEOBJECTINSTANCEW *instance );
|
||||
HRESULT (*get_effect_info)( IDirectInputDevice8W *iface, DIEFFECTINFOW *info, const GUID *guid );
|
||||
};
|
||||
|
||||
#define DEVICE_STATE_MAX_SIZE 1024
|
||||
|
|
|
@ -838,8 +838,8 @@ failed:
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI hid_joystick_GetEffectInfo( IDirectInputDevice8W *iface, DIEFFECTINFOW *info,
|
||||
const GUID *guid )
|
||||
static HRESULT hid_joystick_internal_get_effect_info( IDirectInputDevice8W *iface, DIEFFECTINFOW *info,
|
||||
const GUID *guid )
|
||||
{
|
||||
struct hid_joystick *impl = impl_from_IDirectInputDevice8W( iface );
|
||||
struct pid_effect_update *effect_update = &impl->pid_effect_update;
|
||||
|
@ -853,12 +853,6 @@ static HRESULT WINAPI hid_joystick_GetEffectInfo( IDirectInputDevice8W *iface, D
|
|||
USAGE usage = 0;
|
||||
USHORT count;
|
||||
|
||||
TRACE( "iface %p, info %p, guid %s.\n", iface, info, debugstr_guid( guid ) );
|
||||
|
||||
if (!info) return E_POINTER;
|
||||
if (info->dwSize != sizeof(DIEFFECTINFOW)) return DIERR_INVALIDPARAM;
|
||||
if (!(impl->base.caps.dwFlags & DIDC_FORCEFEEDBACK)) return DIERR_DEVICENOTREG;
|
||||
|
||||
switch ((usage = effect_guid_to_usage( guid )))
|
||||
{
|
||||
case PID_USAGE_ET_SQUARE:
|
||||
|
@ -1085,7 +1079,7 @@ static const IDirectInputDevice8WVtbl hid_joystick_vtbl =
|
|||
/*** IDirectInputDevice2 methods ***/
|
||||
hid_joystick_CreateEffect,
|
||||
IDirectInputDevice2WImpl_EnumEffects,
|
||||
hid_joystick_GetEffectInfo,
|
||||
IDirectInputDevice2WImpl_GetEffectInfo,
|
||||
hid_joystick_GetForceFeedbackState,
|
||||
hid_joystick_SendForceFeedbackCommand,
|
||||
hid_joystick_EnumCreatedEffectObjects,
|
||||
|
@ -1326,6 +1320,7 @@ static const struct dinput_device_vtbl hid_joystick_internal_vtbl =
|
|||
hid_joystick_internal_enum_objects,
|
||||
hid_joystick_internal_get_property,
|
||||
hid_joystick_internal_set_property,
|
||||
hid_joystick_internal_get_effect_info,
|
||||
};
|
||||
|
||||
static DWORD device_type_for_version( DWORD type, DWORD version )
|
||||
|
|
|
@ -338,6 +338,7 @@ static const struct dinput_device_vtbl keyboard_internal_vtbl =
|
|||
keyboard_internal_enum_objects,
|
||||
keyboard_internal_get_property,
|
||||
keyboard_internal_set_property,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const IDirectInputDevice8WVtbl SysKeyboardWvt =
|
||||
|
|
|
@ -651,6 +651,7 @@ static const struct dinput_device_vtbl mouse_internal_vtbl =
|
|||
mouse_internal_enum_objects,
|
||||
mouse_internal_get_property,
|
||||
mouse_internal_set_property,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const IDirectInputDevice8WVtbl SysMouseWvt =
|
||||
|
|
Loading…
Reference in a new issue