Commit 10d0fbec authored by Ivo Ivanov's avatar Ivo Ivanov Committed by Alexandre Julliard

dinput: Fix incorrect use of constant_force instead of ramp_force.

parent 12ad9b0c
......@@ -2437,7 +2437,7 @@ static HRESULT WINAPI hid_joystick_effect_GetParameters( IDirectInputEffect *ifa
case PID_USAGE_ET_RAMP:
if (!params->lpvTypeSpecificParams) return E_POINTER;
if (params->cbTypeSpecificParams != sizeof(DIRAMPFORCE)) return DIERR_INVALIDPARAM;
memcpy( params->lpvTypeSpecificParams, &impl->constant_force, sizeof(DIRAMPFORCE) );
memcpy( params->lpvTypeSpecificParams, &impl->ramp_force, sizeof(DIRAMPFORCE) );
break;
case PID_USAGE_ET_CUSTOM_FORCE_DATA:
FIXME( "DIEP_TYPESPECIFICPARAMS not implemented!\n" );
......@@ -2591,9 +2591,9 @@ static HRESULT WINAPI hid_joystick_effect_SetParameters( IDirectInputEffect *ifa
case PID_USAGE_ET_RAMP:
if (!params->lpvTypeSpecificParams) return E_POINTER;
if (params->cbTypeSpecificParams != sizeof(DIRAMPFORCE)) return DIERR_INVALIDPARAM;
if (memcmp( &impl->constant_force, params->lpvTypeSpecificParams, sizeof(DIRAMPFORCE) ))
if (memcmp( &impl->ramp_force, params->lpvTypeSpecificParams, sizeof(DIRAMPFORCE) ))
impl->modified |= DIEP_TYPESPECIFICPARAMS;
memcpy( &impl->constant_force, params->lpvTypeSpecificParams, sizeof(DIRAMPFORCE) );
memcpy( &impl->ramp_force, params->lpvTypeSpecificParams, sizeof(DIRAMPFORCE) );
impl->params.cbTypeSpecificParams = sizeof(DIRAMPFORCE);
break;
case PID_USAGE_ET_CUSTOM_FORCE_DATA:
......
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