From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/tests/force_feedback.c | 8 ++++---- dlls/windows.gaming.input/force_feedback.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 696828df3fc..f1bc6719e29 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5482,7 +5482,7 @@ static void test_windows_gaming_input(void) .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, - .report_buf = {3,0x01,0x02,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00}, + .report_buf = {3,0x01,0x02,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5a,0x00,0x00,0x00}, .wine_only = TRUE, .todo = TRUE, }, @@ -5523,7 +5523,7 @@ static void test_windows_gaming_input(void) .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, - .report_buf = {3,0x01,0x03,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00}, + .report_buf = {3,0x01,0x03,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5a,0x00,0x00,0x00}, .wine_only = TRUE, .todo = TRUE, }, @@ -5572,7 +5572,7 @@ static void test_windows_gaming_input(void) .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, - .report_buf = {3,0x01,0x04,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00}, + .report_buf = {3,0x01,0x04,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5a,0x00,0x00,0x00}, .wine_only = TRUE, .todo = TRUE, }, @@ -5621,7 +5621,7 @@ static void test_windows_gaming_input(void) .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, - .report_buf = {3,0x01,0x05,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00}, + .report_buf = {3,0x01,0x05,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5a,0x00,0x00,0x00}, .wine_only = TRUE, .todo = TRUE, }, diff --git a/dlls/windows.gaming.input/force_feedback.c b/dlls/windows.gaming.input/force_feedback.c index f3b5f16f8c0..9f24fa8a748 100644 --- a/dlls/windows.gaming.input/force_feedback.c +++ b/dlls/windows.gaming.input/force_feedback.c @@ -232,7 +232,7 @@ HRESULT force_feedback_effect_create( enum WineForceFeedbackEffectType type, IIn impl->params.dwTriggerButton = -1; impl->params.dwGain = 10000; impl->params.dwFlags = DIEFF_CARTESIAN|DIEFF_OBJECTOFFSETS; - impl->params.cAxes = 0; + impl->params.cAxes = 2; impl->axes[0] = DIJOFS_X; impl->axes[1] = DIJOFS_Y; impl->axes[2] = DIJOFS_Z;
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/tests/force_feedback.c | 8 +------ dlls/windows.gaming.input/force_feedback.c | 27 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index f1bc6719e29..1c0a8df7a83 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5572,7 +5572,7 @@ static void test_windows_gaming_input(void) .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, - .report_buf = {3,0x01,0x04,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5a,0x00,0x00,0x00}, + .report_buf = {3,0x01,0x04,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x7f,0x5a,0x00,0x00,0x00}, .wine_only = TRUE, .todo = TRUE, }, @@ -6061,12 +6061,9 @@ static void test_windows_gaming_input(void)
gain = 12345.6; hr = IForceFeedbackEffect_get_Gain( effect, &gain ); - todo_wine ok( hr == S_OK, "get_Gain returned %#lx\n", hr ); - todo_wine ok( gain == 1.0, "got gain %f\n", gain ); hr = IForceFeedbackEffect_put_Gain( effect, 0.5 ); - todo_wine ok( hr == S_FALSE, "put_Gain returned %#lx\n", hr ); state = 0xdeadbeef; hr = IForceFeedbackEffect_get_State( effect, &state ); @@ -6322,12 +6319,9 @@ static void test_windows_gaming_input(void)
gain = 12345.6; hr = IForceFeedbackEffect_get_Gain( effect, &gain ); - todo_wine ok( hr == S_OK, "get_Gain returned %#lx\n", hr ); - todo_wine ok( gain == 1.0, "get_MasterGain returned %f\n", gain ); hr = IForceFeedbackEffect_put_Gain( effect, 0.5 ); - todo_wine ok( hr == S_FALSE, "put_Gain returned %#lx\n", hr ); state = 0xdeadbeef; hr = IForceFeedbackEffect_get_State( effect, &state ); diff --git a/dlls/windows.gaming.input/force_feedback.c b/dlls/windows.gaming.input/force_feedback.c index 9f24fa8a748..667174829f5 100644 --- a/dlls/windows.gaming.input/force_feedback.c +++ b/dlls/windows.gaming.input/force_feedback.c @@ -19,6 +19,8 @@
#include "private.h"
+#include "math.h" + #include "ddk/hidsdi.h" #include "dinput.h" #include "hidusage.h" @@ -117,14 +119,31 @@ DEFINE_IINSPECTABLE_OUTER( effect, IForceFeedbackEffect, struct effect, IInspect
static HRESULT WINAPI effect_get_Gain( IForceFeedbackEffect *iface, DOUBLE *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + struct effect *impl = impl_from_IForceFeedbackEffect( iface ); + + TRACE( "iface %p, value %p.\n", iface, value ); + + EnterCriticalSection( &impl->cs ); + *value = impl->params.dwGain / 10000.; + LeaveCriticalSection( &impl->cs ); + + return S_OK; }
static HRESULT WINAPI effect_put_Gain( IForceFeedbackEffect *iface, DOUBLE value ) { - FIXME( "iface %p, value %f stub!\n", iface, value ); - return E_NOTIMPL; + struct effect *impl = impl_from_IForceFeedbackEffect( iface ); + HRESULT hr; + + TRACE( "iface %p, value %f.\n", iface, value ); + + EnterCriticalSection( &impl->cs ); + impl->params.dwGain = round( value * 10000 ); + if (!impl->effect) hr = S_FALSE; + else hr = IDirectInputEffect_SetParameters( impl->effect, &impl->params, DIEP_GAIN ); + LeaveCriticalSection( &impl->cs ); + + return hr; }
static HRESULT WINAPI effect_get_State( IForceFeedbackEffect *iface, ForceFeedbackEffectState *value )
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=114987
Your paranoid android.
=== debian11 (32 bit French report) ===
dinput: force_feedback.c:6388: Test failed: Release returned 1
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/tests/force_feedback.c | 6 +- dlls/windows.gaming.input/constant_effect.c | 45 +++++++++++++-- dlls/windows.gaming.input/force_feedback.c | 62 +++++++++++++++++++++ dlls/windows.gaming.input/provider.idl | 29 ++++++++++ 4 files changed, 132 insertions(+), 10 deletions(-)
diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 1c0a8df7a83..2fbcbfe458f 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5557,7 +5557,6 @@ static void test_windows_gaming_input(void) .report_id = 9, .report_len = 4, .report_buf = {9,0x01,0xc8,0x00}, - .todo = TRUE, }, /* set envelope */ { @@ -5565,14 +5564,13 @@ static void test_windows_gaming_input(void) .report_id = 8, .report_len = 8, .report_buf = {8,0x01,0x19,0x4c,0x14,0x00,0x3c,0x00}, - .todo = TRUE, }, /* update effect */ { .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, - .report_buf = {3,0x01,0x04,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x7f,0x5a,0x00,0x00,0x00}, + .report_buf = {3,0x01,0x04,0x08,0x5a,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xff,0x7f,0xce,0x00,0x00,0x00}, .wine_only = TRUE, .todo = TRUE, }, @@ -6309,11 +6307,9 @@ static void test_windows_gaming_input(void) ok( hr == S_OK, "QueryInterface returned %#lx\n", hr );
hr = IConstantForceEffect_SetParameters( constant_effect, direction, duration ); - todo_wine ok( hr == S_OK, "SetParameters returned %#lx\n", hr ); hr = IConstantForceEffect_SetParametersWithEnvelope( constant_effect, direction, 0.1, 0.2, 0.3, delay, attack_duration, duration, release_duration, 1 ); - todo_wine ok( hr == S_OK, "SetParametersWithEnvelope returned %#lx\n", hr ); IConstantForceEffect_Release( constant_effect );
diff --git a/dlls/windows.gaming.input/constant_effect.c b/dlls/windows.gaming.input/constant_effect.c index 928927144b9..0af5d736f48 100644 --- a/dlls/windows.gaming.input/constant_effect.c +++ b/dlls/windows.gaming.input/constant_effect.c @@ -99,8 +99,21 @@ static HRESULT WINAPI effect_GetTrustLevel( IConstantForceEffect *iface, TrustLe
static HRESULT WINAPI effect_SetParameters( IConstantForceEffect *iface, Vector3 direction, TimeSpan duration ) { - FIXME( "iface %p, direction %s, duration %I64u stub!\n", iface, debugstr_vector3( &direction ), duration.Duration ); - return E_NOTIMPL; + WineForceFeedbackEffectParameters params = + { + .constant = + { + .type = WineForceFeedbackEffectType_Constant, + .direction = direction, + .duration = duration, + .repeat_count = 1, + }, + }; + struct constant_effect *impl = impl_from_IConstantForceEffect( iface ); + + TRACE( "iface %p, direction %s, duration %I64u.\n", iface, debugstr_vector3( &direction ), duration.Duration ); + + return IWineForceFeedbackEffectImpl_put_Parameters( impl->IWineForceFeedbackEffectImpl_inner, params, NULL ); }
static HRESULT WINAPI effect_SetParametersWithEnvelope( IConstantForceEffect *iface, Vector3 direction, FLOAT attack_gain, @@ -108,11 +121,33 @@ static HRESULT WINAPI effect_SetParametersWithEnvelope( IConstantForceEffect *if TimeSpan attack_duration, TimeSpan sustain_duration, TimeSpan release_duration, UINT32 repeat_count ) { - FIXME( "iface %p, direction %s, attack_gain %f, sustain_gain %f, release_gain %f, start_delay %I64u, attack_duration %I64u, " - "sustain_duration %I64u, release_duration %I64u, repeat_count %u stub!\n", iface, debugstr_vector3( &direction ), + WineForceFeedbackEffectParameters params = + { + .constant = + { + .type = WineForceFeedbackEffectType_Constant, + .direction = direction, + .duration = {attack_duration.Duration + sustain_duration.Duration + release_duration.Duration}, + .start_delay = start_delay, + .repeat_count = repeat_count, + .gain = sustain_gain, + }, + }; + WineForceFeedbackEffectEnvelope envelope = + { + .attack_gain = attack_gain, + .release_gain = release_gain, + .attack_duration = attack_duration, + .release_duration = release_duration, + }; + struct constant_effect *impl = impl_from_IConstantForceEffect( iface ); + + TRACE( "iface %p, direction %s, attack_gain %f, sustain_gain %f, release_gain %f, start_delay %I64u, attack_duration %I64u, " + "sustain_duration %I64u, release_duration %I64u, repeat_count %u.\n", iface, debugstr_vector3( &direction ), attack_gain, sustain_gain, release_gain, start_delay.Duration, attack_duration.Duration, sustain_duration.Duration, release_duration.Duration, repeat_count ); - return E_NOTIMPL; + + return IWineForceFeedbackEffectImpl_put_Parameters( impl->IWineForceFeedbackEffectImpl_inner, params, &envelope ); }
static const struct IConstantForceEffectVtbl effect_vtbl = diff --git a/dlls/windows.gaming.input/force_feedback.c b/dlls/windows.gaming.input/force_feedback.c index 667174829f5..ce30db14cd9 100644 --- a/dlls/windows.gaming.input/force_feedback.c +++ b/dlls/windows.gaming.input/force_feedback.c @@ -43,10 +43,12 @@ struct effect GUID type; DWORD axes[3]; LONG directions[3]; + ULONG repeat_count; DICONSTANTFORCE constant_force; DIRAMPFORCE ramp_force; DICONDITION condition; DIPERIODIC periodic; + DIENVELOPE envelope; DIEFFECT params; };
@@ -107,12 +109,71 @@ static ULONG WINAPI effect_impl_Release( IWineForceFeedbackEffectImpl *iface ) return ref; }
+static HRESULT WINAPI effect_impl_put_Parameters( IWineForceFeedbackEffectImpl *iface, WineForceFeedbackEffectParameters params, + WineForceFeedbackEffectEnvelope *envelope ) +{ + struct effect *impl = impl_from_IWineForceFeedbackEffectImpl( iface ); + HRESULT hr; + + TRACE( "iface %p, params %p, envelope %p.\n", iface, ¶ms, envelope ); + + EnterCriticalSection( &impl->cs ); + switch (params.type) + { + case WineForceFeedbackEffectType_Constant: + impl->repeat_count = params.constant.repeat_count; + impl->constant_force.lMagnitude = round( params.constant.gain * params.constant.direction.X * 10000 ); + impl->params.dwDuration = params.constant.duration.Duration / 10; + impl->params.dwStartDelay = params.constant.start_delay.Duration / 10; + impl->directions[0] = round( -params.constant.direction.X * 10000 ); + impl->directions[1] = round( -params.constant.direction.Y * 10000 ); + impl->directions[2] = round( -params.constant.direction.Z * 10000 ); + break; + + case WineForceFeedbackEffectType_Ramp: + FIXME("stub!\n"); + break; + + case WineForceFeedbackEffectType_Periodic_SineWave: + case WineForceFeedbackEffectType_Periodic_TriangleWave: + case WineForceFeedbackEffectType_Periodic_SquareWave: + case WineForceFeedbackEffectType_Periodic_SawtoothWaveDown: + case WineForceFeedbackEffectType_Periodic_SawtoothWaveUp: + FIXME("stub!\n"); + break; + + case WineForceFeedbackEffectType_Condition_Spring: + case WineForceFeedbackEffectType_Condition_Damper: + case WineForceFeedbackEffectType_Condition_Inertia: + case WineForceFeedbackEffectType_Condition_Friction: + FIXME("stub!\n"); + break; + } + + if (!envelope) impl->params.lpEnvelope = NULL; + else + { + impl->envelope.dwAttackTime = envelope->attack_duration.Duration / 10; + impl->envelope.dwAttackLevel = round( envelope->attack_gain * 10000 ); + impl->envelope.dwFadeTime = impl->params.dwDuration - envelope->release_duration.Duration / 10; + impl->envelope.dwFadeLevel = round( envelope->release_gain * 10000 ); + impl->params.lpEnvelope = &impl->envelope; + } + + if (!impl->effect) hr = S_OK; + else hr = IDirectInputEffect_SetParameters( impl->effect, &impl->params, DIEP_ALLPARAMS & ~DIEP_AXES ); + LeaveCriticalSection( &impl->cs ); + + return hr; +} + static const struct IWineForceFeedbackEffectImplVtbl effect_impl_vtbl = { effect_impl_QueryInterface, effect_impl_AddRef, effect_impl_Release, /* IWineForceFeedbackEffectImpl methods */ + effect_impl_put_Parameters, };
DEFINE_IINSPECTABLE_OUTER( effect, IForceFeedbackEffect, struct effect, IInspectable_outer ) @@ -245,6 +306,7 @@ HRESULT force_feedback_effect_create( enum WineForceFeedbackEffectType type, IIn break; }
+ impl->envelope.dwSize = sizeof(DIENVELOPE); impl->params.dwSize = sizeof(DIEFFECT); impl->params.rgdwAxes = impl->axes; impl->params.rglDirection = impl->directions; diff --git a/dlls/windows.gaming.input/provider.idl b/dlls/windows.gaming.input/provider.idl index 128e68893a9..16d394e7afa 100644 --- a/dlls/windows.gaming.input/provider.idl +++ b/dlls/windows.gaming.input/provider.idl @@ -37,6 +37,9 @@ namespace Windows.Gaming.Input.Custom { typedef enum WineForceFeedbackEffectType WineForceFeedbackEffectType; typedef struct WineGameControllerState WineGameControllerState; typedef struct WineGameControllerVibration WineGameControllerVibration; + typedef struct WineConstantEffectParameters WineConstantEffectParameters; + typedef struct WineForceFeedbackEffectEnvelope WineForceFeedbackEffectEnvelope; + typedef union WineForceFeedbackEffectParameters WineForceFeedbackEffectParameters; interface IWineGameControllerProvider; runtimeclass WineGameControllerProvider;
@@ -87,6 +90,30 @@ namespace Windows.Gaming.Input.Custom { UINT16 right; };
+ struct WineConstantEffectParameters + { + WineForceFeedbackEffectType type; + Windows.Foundation.Numerics.Vector3 direction; + Windows.Foundation.TimeSpan duration; + Windows.Foundation.TimeSpan start_delay; + UINT32 repeat_count; + FLOAT gain; + }; + + struct WineForceFeedbackEffectEnvelope + { + FLOAT attack_gain; + FLOAT release_gain; + Windows.Foundation.TimeSpan attack_duration; + Windows.Foundation.TimeSpan release_duration; + }; + + union WineForceFeedbackEffectParameters + { + WineForceFeedbackEffectType type; + WineConstantEffectParameters constant; + }; + [ uuid(06e58977-7684-4dc5-bad1-cda52a4aa06d) ] @@ -122,6 +149,8 @@ namespace Windows.Gaming.Input.Custom { interface IWineForceFeedbackEffectImpl : IUnknown requires Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect { + [propput] HRESULT Parameters([in] WineForceFeedbackEffectParameters parameters, + [in, optional] WineForceFeedbackEffectEnvelope *envelope); }
[
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/tests/force_feedback.c | 6 +-- dlls/windows.gaming.input/force_feedback.c | 9 ++++- dlls/windows.gaming.input/provider.idl | 13 ++++++ dlls/windows.gaming.input/ramp_effect.c | 47 +++++++++++++++++++--- 4 files changed, 64 insertions(+), 11 deletions(-)
diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 2fbcbfe458f..8440d8e85cf 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5604,7 +5604,6 @@ static void test_windows_gaming_input(void) .report_id = 10, .report_len = 6, .report_buf = {10,0x01,0xc8,0x00,0x20,0x03}, - .todo = TRUE, }, /* set envelope */ { @@ -5612,14 +5611,13 @@ static void test_windows_gaming_input(void) .report_id = 8, .report_len = 8, .report_buf = {8,0x01,0x19,0x4c,0x14,0x00,0x3c,0x00}, - .todo = TRUE, }, /* update effect */ { .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, - .report_buf = {3,0x01,0x05,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5a,0x00,0x00,0x00}, + .report_buf = {3,0x01,0x05,0x08,0x5a,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xff,0xff,0xce,0x00,0x00,0x00}, .wine_only = TRUE, .todo = TRUE, }, @@ -6406,11 +6404,9 @@ static void test_windows_gaming_input(void) ok( hr == S_OK, "QueryInterface returned %#lx\n", hr );
hr = IRampForceEffect_SetParameters( ramp_effect, direction, end_direction, duration ); - todo_wine ok( hr == S_OK, "SetParameters returned %#lx\n", hr ); hr = IRampForceEffect_SetParametersWithEnvelope( ramp_effect, direction, end_direction, 0.1, 0.2, 0.3, delay, attack_duration, duration, release_duration, 1 ); - todo_wine ok( hr == S_OK, "SetParametersWithEnvelope returned %#lx\n", hr ); IRampForceEffect_Release( ramp_effect );
diff --git a/dlls/windows.gaming.input/force_feedback.c b/dlls/windows.gaming.input/force_feedback.c index ce30db14cd9..2ed272916c9 100644 --- a/dlls/windows.gaming.input/force_feedback.c +++ b/dlls/windows.gaming.input/force_feedback.c @@ -131,7 +131,14 @@ static HRESULT WINAPI effect_impl_put_Parameters( IWineForceFeedbackEffectImpl * break;
case WineForceFeedbackEffectType_Ramp: - FIXME("stub!\n"); + impl->repeat_count = params.ramp.repeat_count; + impl->ramp_force.lStart = round( params.ramp.gain * params.ramp.start_vector.X * 10000 ); + impl->ramp_force.lEnd = round( params.ramp.gain * params.ramp.end_vector.X * 10000 ); + impl->params.dwDuration = params.ramp.duration.Duration / 10; + impl->params.dwStartDelay = params.ramp.start_delay.Duration / 10; + impl->directions[0] = round( -params.ramp.start_vector.X * 10000 ); + impl->directions[1] = round( -params.ramp.start_vector.Y * 10000 ); + impl->directions[2] = round( -params.ramp.start_vector.Z * 10000 ); break;
case WineForceFeedbackEffectType_Periodic_SineWave: diff --git a/dlls/windows.gaming.input/provider.idl b/dlls/windows.gaming.input/provider.idl index 16d394e7afa..3baac4fe77d 100644 --- a/dlls/windows.gaming.input/provider.idl +++ b/dlls/windows.gaming.input/provider.idl @@ -38,6 +38,7 @@ namespace Windows.Gaming.Input.Custom { typedef struct WineGameControllerState WineGameControllerState; typedef struct WineGameControllerVibration WineGameControllerVibration; typedef struct WineConstantEffectParameters WineConstantEffectParameters; + typedef struct WineRampEffectParameters WineRampEffectParameters; typedef struct WineForceFeedbackEffectEnvelope WineForceFeedbackEffectEnvelope; typedef union WineForceFeedbackEffectParameters WineForceFeedbackEffectParameters; interface IWineGameControllerProvider; @@ -100,6 +101,17 @@ namespace Windows.Gaming.Input.Custom { FLOAT gain; };
+ struct WineRampEffectParameters + { + WineForceFeedbackEffectType type; + Windows.Foundation.Numerics.Vector3 start_vector; + Windows.Foundation.Numerics.Vector3 end_vector; + Windows.Foundation.TimeSpan duration; + Windows.Foundation.TimeSpan start_delay; + UINT32 repeat_count; + FLOAT gain; + }; + struct WineForceFeedbackEffectEnvelope { FLOAT attack_gain; @@ -112,6 +124,7 @@ namespace Windows.Gaming.Input.Custom { { WineForceFeedbackEffectType type; WineConstantEffectParameters constant; + WineRampEffectParameters ramp; };
[ diff --git a/dlls/windows.gaming.input/ramp_effect.c b/dlls/windows.gaming.input/ramp_effect.c index 0a719b3e2a6..a498942cabe 100644 --- a/dlls/windows.gaming.input/ramp_effect.c +++ b/dlls/windows.gaming.input/ramp_effect.c @@ -99,9 +99,23 @@ static HRESULT WINAPI effect_GetTrustLevel( IRampForceEffect *iface, TrustLevel
static HRESULT WINAPI effect_SetParameters( IRampForceEffect *iface, Vector3 start_vector, Vector3 end_vector, TimeSpan duration ) { - FIXME( "iface %p, start_vector %s, end_vector %s, duration %I64u stub!\n", iface, + WineForceFeedbackEffectParameters params = + { + .ramp = + { + .type = WineForceFeedbackEffectType_Ramp, + .start_vector = start_vector, + .end_vector = end_vector, + .duration = duration, + .repeat_count = 1, + }, + }; + struct ramp_effect *impl = impl_from_IRampForceEffect( iface ); + + TRACE( "iface %p, start_vector %s, end_vector %s, duration %I64u.\n", iface, debugstr_vector3( &start_vector ), debugstr_vector3( &end_vector ), duration.Duration ); - return E_NOTIMPL; + + return IWineForceFeedbackEffectImpl_put_Parameters( impl->IWineForceFeedbackEffectImpl_inner, params, NULL ); }
static HRESULT WINAPI effect_SetParametersWithEnvelope( IRampForceEffect *iface, Vector3 start_vector, Vector3 end_vector, FLOAT attack_gain, @@ -109,11 +123,34 @@ static HRESULT WINAPI effect_SetParametersWithEnvelope( IRampForceEffect *iface, TimeSpan attack_duration, TimeSpan sustain_duration, TimeSpan release_duration, UINT32 repeat_count ) { - FIXME( "iface %p, start_vector %s, end_vector %s, attack_gain %f, sustain_gain %f, release_gain %f, start_delay %I64u, attack_duration %I64u, " - "sustain_duration %I64u, release_duration %I64u, repeat_count %u stub!\n", iface, debugstr_vector3( &start_vector ), debugstr_vector3( &end_vector ), + WineForceFeedbackEffectParameters params = + { + .ramp = + { + .type = WineForceFeedbackEffectType_Ramp, + .start_vector = start_vector, + .end_vector = end_vector, + .duration = {attack_duration.Duration + sustain_duration.Duration + release_duration.Duration}, + .start_delay = start_delay, + .repeat_count = repeat_count, + .gain = sustain_gain, + }, + }; + WineForceFeedbackEffectEnvelope envelope = + { + .attack_gain = attack_gain, + .release_gain = release_gain, + .attack_duration = attack_duration, + .release_duration = release_duration, + }; + struct ramp_effect *impl = impl_from_IRampForceEffect( iface ); + + TRACE( "iface %p, start_vector %s, end_vector %s, attack_gain %f, sustain_gain %f, release_gain %f, start_delay %I64u, attack_duration %I64u, " + "sustain_duration %I64u, release_duration %I64u, repeat_count %u.\n", iface, debugstr_vector3( &start_vector ), debugstr_vector3( &end_vector ), attack_gain, sustain_gain, release_gain, start_delay.Duration, attack_duration.Duration, sustain_duration.Duration, release_duration.Duration, repeat_count ); - return E_NOTIMPL; + + return IWineForceFeedbackEffectImpl_put_Parameters( impl->IWineForceFeedbackEffectImpl_inner, params, &envelope ); }
static const struct IRampForceEffectVtbl effect_vtbl =
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=114989
Your paranoid android.
=== debian11 (32 bit Japanese:Japan report) ===
dinput: force_feedback.c:6181: Test failed: Release returned 1 force_feedback.c:6281: Test failed: Release returned 1
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/tests/force_feedback.c | 8 +--- dlls/windows.gaming.input/force_feedback.c | 11 ++++- dlls/windows.gaming.input/periodic_effect.c | 52 +++++++++++++++++++-- dlls/windows.gaming.input/provider.idl | 15 ++++++ 4 files changed, 73 insertions(+), 13 deletions(-)
diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 8440d8e85cf..8e45f9e0089 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5467,7 +5467,6 @@ static void test_windows_gaming_input(void) .report_id = 7, .report_len = 10, .report_buf = {7,0x01,0xa0,0x0f,0xd0,0x07,0x70,0xff,0x0a,0x00}, - .todo = TRUE, }, /* set envelope */ { @@ -5475,14 +5474,13 @@ static void test_windows_gaming_input(void) .report_id = 8, .report_len = 8, .report_buf = {8,0x01,0x4c,0x7f,0x28,0x00,0x50,0x00}, - .todo = TRUE, }, /* update effect */ { .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, - .report_buf = {3,0x01,0x02,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5a,0x00,0x00,0x00}, + .report_buf = {3,0x01,0x02,0x08,0x78,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xff,0xff,0xce,0x00,0x00,0x00}, .wine_only = TRUE, .todo = TRUE, }, @@ -6047,11 +6045,9 @@ static void test_windows_gaming_input(void) ok( hr == S_OK, "get_Kind returned %#lx\n", hr ); ok( periodic_kind == PeriodicForceEffectKind_SawtoothWaveUp, "got kind %u\n", periodic_kind ); hr = IPeriodicForceEffect_SetParameters( periodic_effect, direction, 1.0, 0.1, 0.0, duration ); - todo_wine ok( hr == S_OK, "SetParameters returned %#lx\n", hr ); hr = IPeriodicForceEffect_SetParametersWithEnvelope( periodic_effect, direction, 100.0, 0.1, 0.2, 0.3, 0.4, 0.5, delay, attack_duration, duration, release_duration, 1 ); - todo_wine ok( hr == S_OK, "SetParametersWithEnvelope returned %#lx\n", hr ); IPeriodicForceEffect_Release( periodic_effect );
@@ -6121,11 +6117,9 @@ static void test_windows_gaming_input(void) ok( hr == S_OK, "get_Kind returned %#lx\n", hr ); ok( periodic_kind == PeriodicForceEffectKind_SineWave, "got kind %u\n", periodic_kind ); hr = IPeriodicForceEffect_SetParameters( periodic_effect, direction, 1.0, 0.1, 0.0, duration ); - todo_wine ok( hr == S_OK, "SetParameters returned %#lx\n", hr ); hr = IPeriodicForceEffect_SetParametersWithEnvelope( periodic_effect, direction, 100.0, 0.1, 0.2, 0.3, 0.4, 0.5, delay, duration, duration, duration, 1 ); - todo_wine ok( hr == S_OK, "SetParametersWithEnvelope returned %#lx\n", hr ); IPeriodicForceEffect_Release( periodic_effect );
diff --git a/dlls/windows.gaming.input/force_feedback.c b/dlls/windows.gaming.input/force_feedback.c index 2ed272916c9..3e6b49ee1aa 100644 --- a/dlls/windows.gaming.input/force_feedback.c +++ b/dlls/windows.gaming.input/force_feedback.c @@ -146,7 +146,16 @@ static HRESULT WINAPI effect_impl_put_Parameters( IWineForceFeedbackEffectImpl * case WineForceFeedbackEffectType_Periodic_SquareWave: case WineForceFeedbackEffectType_Periodic_SawtoothWaveDown: case WineForceFeedbackEffectType_Periodic_SawtoothWaveUp: - FIXME("stub!\n"); + impl->repeat_count = params.periodic.repeat_count; + impl->periodic.dwMagnitude = round( params.periodic.gain * 10000 ); + impl->periodic.dwPeriod = 1000000 / params.periodic.frequency; + impl->periodic.dwPhase = round( params.periodic.phase * 36000 ); + impl->periodic.lOffset = round( params.periodic.bias * 10000 ); + impl->params.dwDuration = params.periodic.duration.Duration / 10; + impl->params.dwStartDelay = params.periodic.start_delay.Duration / 10; + impl->directions[0] = round( -params.periodic.direction.X * 10000 ); + impl->directions[1] = round( -params.periodic.direction.Y * 10000 ); + impl->directions[2] = round( -params.periodic.direction.Z * 10000 ); break;
case WineForceFeedbackEffectType_Condition_Spring: diff --git a/dlls/windows.gaming.input/periodic_effect.c b/dlls/windows.gaming.input/periodic_effect.c index 81ca60f28ef..8633a8fb9b9 100644 --- a/dlls/windows.gaming.input/periodic_effect.c +++ b/dlls/windows.gaming.input/periodic_effect.c @@ -110,9 +110,26 @@ static HRESULT WINAPI effect_get_Kind( IPeriodicForceEffect *iface, PeriodicForc static HRESULT WINAPI effect_SetParameters( IPeriodicForceEffect *iface, Vector3 direction, FLOAT frequency, FLOAT phase, FLOAT bias, TimeSpan duration ) { - FIXME( "iface %p, direction %s, frequency %f, phase %f, bias %f, duration %I64u stub!\n", iface, + struct periodic_effect *impl = impl_from_IPeriodicForceEffect( iface ); + WineForceFeedbackEffectParameters params = + { + .periodic = + { + .type = WineForceFeedbackEffectType_Periodic_SquareWave + impl->kind, + .direction = direction, + .frequency = frequency, + .phase = phase, + .bias = bias, + .duration = duration, + .repeat_count = 1, + .gain = 1., + }, + }; + + TRACE( "iface %p, direction %s, frequency %f, phase %f, bias %f, duration %I64u.\n", iface, debugstr_vector3( &direction ), frequency, phase, bias, duration.Duration ); - return E_NOTIMPL; + + return IWineForceFeedbackEffectImpl_put_Parameters( impl->IWineForceFeedbackEffectImpl_inner, params, NULL ); }
static HRESULT WINAPI effect_SetParametersWithEnvelope( IPeriodicForceEffect *iface, Vector3 direction, FLOAT frequency, FLOAT phase, FLOAT bias, @@ -120,11 +137,36 @@ static HRESULT WINAPI effect_SetParametersWithEnvelope( IPeriodicForceEffect *if TimeSpan attack_duration, TimeSpan sustain_duration, TimeSpan release_duration, UINT32 repeat_count ) { - FIXME( "iface %p, direction %s, frequency %f, phase %f, bias %f, attack_gain %f, sustain_gain %f, release_gain %f, start_delay %I64u, " - "attack_duration %I64u, sustain_duration %I64u, release_duration %I64u, repeat_count %u stub!\n", iface, debugstr_vector3( &direction ), + struct periodic_effect *impl = impl_from_IPeriodicForceEffect( iface ); + WineForceFeedbackEffectParameters params = + { + .periodic = + { + .type = WineForceFeedbackEffectType_Periodic_SquareWave + impl->kind, + .direction = direction, + .frequency = frequency, + .phase = phase, + .bias = bias, + .duration = {attack_duration.Duration + sustain_duration.Duration + release_duration.Duration}, + .start_delay = start_delay, + .repeat_count = repeat_count, + .gain = sustain_gain, + }, + }; + WineForceFeedbackEffectEnvelope envelope = + { + .attack_gain = attack_gain, + .release_gain = release_gain, + .attack_duration = attack_duration, + .release_duration = release_duration, + }; + + TRACE( "iface %p, direction %s, frequency %f, phase %f, bias %f, attack_gain %f, sustain_gain %f, release_gain %f, start_delay %I64u, " + "attack_duration %I64u, sustain_duration %I64u, release_duration %I64u, repeat_count %u.\n", iface, debugstr_vector3( &direction ), frequency, phase, bias, attack_gain, sustain_gain, release_gain, start_delay.Duration, attack_duration.Duration, sustain_duration.Duration, release_duration.Duration, repeat_count ); - return E_NOTIMPL; + + return IWineForceFeedbackEffectImpl_put_Parameters( impl->IWineForceFeedbackEffectImpl_inner, params, &envelope ); }
static const struct IPeriodicForceEffectVtbl effect_vtbl = diff --git a/dlls/windows.gaming.input/provider.idl b/dlls/windows.gaming.input/provider.idl index 3baac4fe77d..4aacc43d80e 100644 --- a/dlls/windows.gaming.input/provider.idl +++ b/dlls/windows.gaming.input/provider.idl @@ -39,6 +39,7 @@ namespace Windows.Gaming.Input.Custom { typedef struct WineGameControllerVibration WineGameControllerVibration; typedef struct WineConstantEffectParameters WineConstantEffectParameters; typedef struct WineRampEffectParameters WineRampEffectParameters; + typedef struct WinePeriodicEffectParameters WinePeriodicEffectParameters; typedef struct WineForceFeedbackEffectEnvelope WineForceFeedbackEffectEnvelope; typedef union WineForceFeedbackEffectParameters WineForceFeedbackEffectParameters; interface IWineGameControllerProvider; @@ -112,6 +113,19 @@ namespace Windows.Gaming.Input.Custom { FLOAT gain; };
+ struct WinePeriodicEffectParameters + { + WineForceFeedbackEffectType type; + Windows.Foundation.Numerics.Vector3 direction; + Windows.Foundation.TimeSpan duration; + Windows.Foundation.TimeSpan start_delay; + UINT32 repeat_count; + FLOAT frequency; + FLOAT phase; + FLOAT bias; + FLOAT gain; + }; + struct WineForceFeedbackEffectEnvelope { FLOAT attack_gain; @@ -125,6 +139,7 @@ namespace Windows.Gaming.Input.Custom { WineForceFeedbackEffectType type; WineConstantEffectParameters constant; WineRampEffectParameters ramp; + WinePeriodicEffectParameters periodic; };
[
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/tests/force_feedback.c | 11 ----------- dlls/windows.gaming.input/condition_effect.c | 20 ++++++++++++++++++-- dlls/windows.gaming.input/force_feedback.c | 13 ++++++++++++- dlls/windows.gaming.input/provider.idl | 14 ++++++++++++++ 4 files changed, 44 insertions(+), 14 deletions(-)
diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 8e45f9e0089..1759024063b 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5514,23 +5514,13 @@ static void test_windows_gaming_input(void) .report_id = 4, .report_len = 12, .report_buf = {4,0x01,0x00,0x70,0x17,0x7b,0x02,0xe9,0x04,0x4c,0x66,0x7f}, - .todo = TRUE, }, /* update effect */ - { - .code = IOCTL_HID_WRITE_REPORT, - .report_id = 3, - .report_len = 18, - .report_buf = {3,0x01,0x03,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5a,0x00,0x00,0x00}, - .wine_only = TRUE, - .todo = TRUE, - }, { .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, .report_buf = {3,0x01,0x03,0x08,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x99,0x00,0x00,0x00}, - .todo = TRUE, }, }; struct hid_expect expect_create_constant[] = @@ -6219,7 +6209,6 @@ static void test_windows_gaming_input(void) ok( hr == S_OK, "get_Kind returned %#lx\n", hr ); ok( condition_kind == ConditionForceEffectKind_Spring, "got kind %u\n", condition_kind ); hr = IConditionForceEffect_SetParameters( condition_effect, direction, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6 ); - todo_wine ok( hr == S_OK, "SetParameters returned %#lx\n", hr ); IConditionForceEffect_Release( condition_effect );
diff --git a/dlls/windows.gaming.input/condition_effect.c b/dlls/windows.gaming.input/condition_effect.c index dccc50bb48f..c3a5a1fcd8b 100644 --- a/dlls/windows.gaming.input/condition_effect.c +++ b/dlls/windows.gaming.input/condition_effect.c @@ -110,10 +110,26 @@ static HRESULT WINAPI effect_get_Kind( IConditionForceEffect *iface, ConditionFo static HRESULT WINAPI effect_SetParameters( IConditionForceEffect *iface, Vector3 direction, FLOAT positive_coeff, FLOAT negative_coeff, FLOAT max_positive_magnitude, FLOAT max_negative_magnitude, FLOAT deadzone, FLOAT bias ) { - FIXME( "iface %p, direction %s, positive_coeff %f, negative_coeff %f, max_positive_magnitude %f, max_negative_magnitude %f, deadzone %f, bias %f stub!\n", + struct condition_effect *impl = impl_from_IConditionForceEffect( iface ); + WineForceFeedbackEffectParameters params = + { + .condition = + { + .type = WineForceFeedbackEffectType_Condition + impl->kind, + .direction = direction, + .positive_coeff = positive_coeff, + .negative_coeff = negative_coeff, + .max_positive_magnitude = max_positive_magnitude, + .max_negative_magnitude = max_negative_magnitude, + .deadzone = deadzone, + .bias = bias, + }, + }; + + TRACE( "iface %p, direction %s, positive_coeff %f, negative_coeff %f, max_positive_magnitude %f, max_negative_magnitude %f, deadzone %f, bias %f.\n", iface, debugstr_vector3( &direction ), positive_coeff, negative_coeff, max_positive_magnitude, max_negative_magnitude, deadzone, bias );
- return E_NOTIMPL; + return IWineForceFeedbackEffectImpl_put_Parameters( impl->IWineForceFeedbackEffectImpl_inner, params, NULL ); }
static const struct IConditionForceEffectVtbl effect_vtbl = diff --git a/dlls/windows.gaming.input/force_feedback.c b/dlls/windows.gaming.input/force_feedback.c index 3e6b49ee1aa..dd10f86bd3e 100644 --- a/dlls/windows.gaming.input/force_feedback.c +++ b/dlls/windows.gaming.input/force_feedback.c @@ -162,7 +162,18 @@ static HRESULT WINAPI effect_impl_put_Parameters( IWineForceFeedbackEffectImpl * case WineForceFeedbackEffectType_Condition_Damper: case WineForceFeedbackEffectType_Condition_Inertia: case WineForceFeedbackEffectType_Condition_Friction: - FIXME("stub!\n"); + impl->repeat_count = 1; + impl->condition.lPositiveCoefficient = round( atan( params.condition.positive_coeff ) / M_PI_2 * 10000 ); + impl->condition.lNegativeCoefficient = round( atan( params.condition.negative_coeff ) / M_PI_2 * 10000 ); + impl->condition.dwPositiveSaturation = round( params.condition.max_positive_magnitude * 10000 ); + impl->condition.dwNegativeSaturation = round( params.condition.max_negative_magnitude * 10000 ); + impl->condition.lDeadBand = round( params.condition.deadzone * 10000 ); + impl->condition.lOffset = round( params.condition.bias * 10000 ); + impl->params.dwDuration = -1; + impl->params.dwStartDelay = 0; + impl->directions[0] = round( params.condition.direction.X * 10000 ); + impl->directions[1] = round( params.condition.direction.Y * 10000 ); + impl->directions[2] = round( params.condition.direction.Z * 10000 ); break; }
diff --git a/dlls/windows.gaming.input/provider.idl b/dlls/windows.gaming.input/provider.idl index 4aacc43d80e..e7b6e96b8aa 100644 --- a/dlls/windows.gaming.input/provider.idl +++ b/dlls/windows.gaming.input/provider.idl @@ -37,6 +37,7 @@ namespace Windows.Gaming.Input.Custom { typedef enum WineForceFeedbackEffectType WineForceFeedbackEffectType; typedef struct WineGameControllerState WineGameControllerState; typedef struct WineGameControllerVibration WineGameControllerVibration; + typedef struct WineConditionEffectParameters WineConditionEffectParameters; typedef struct WineConstantEffectParameters WineConstantEffectParameters; typedef struct WineRampEffectParameters WineRampEffectParameters; typedef struct WinePeriodicEffectParameters WinePeriodicEffectParameters; @@ -92,6 +93,18 @@ namespace Windows.Gaming.Input.Custom { UINT16 right; };
+ struct WineConditionEffectParameters + { + WineForceFeedbackEffectType type; + Windows.Foundation.Numerics.Vector3 direction; + FLOAT positive_coeff; + FLOAT negative_coeff; + FLOAT max_positive_magnitude; + FLOAT max_negative_magnitude; + FLOAT deadzone; + FLOAT bias; + }; + struct WineConstantEffectParameters { WineForceFeedbackEffectType type; @@ -137,6 +150,7 @@ namespace Windows.Gaming.Input.Custom { union WineForceFeedbackEffectParameters { WineForceFeedbackEffectType type; + WineConditionEffectParameters condition; WineConstantEffectParameters constant; WineRampEffectParameters ramp; WinePeriodicEffectParameters periodic;
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/joystick_hid.c | 1 + dlls/dinput/tests/force_feedback.c | 27 --------------------------- 2 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 07cf2e6158d..1f4b300be74 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -2307,6 +2307,7 @@ static void convert_directions_to_spherical( const DIEFFECT *in, DIEFFECT *out ) for (j = 1; j < i; ++j) tmp = sqrt( tmp * tmp + in->rglDirection[j] * in->rglDirection[j] ); tmp = atan2( in->rglDirection[i], tmp ); out->rglDirection[i - 1] = tmp * 18000 / M_PI; + if (out->rglDirection[i - 1] < 0) out->rglDirection[i - 1] += 36000; } if (in->cAxes) out->rglDirection[in->cAxes - 1] = 0; out->cAxes = in->cAxes; diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 1759024063b..e9002a32676 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5476,20 +5476,11 @@ static void test_windows_gaming_input(void) .report_buf = {8,0x01,0x4c,0x7f,0x28,0x00,0x50,0x00}, }, /* update effect */ - { - .code = IOCTL_HID_WRITE_REPORT, - .report_id = 3, - .report_len = 18, - .report_buf = {3,0x01,0x02,0x08,0x78,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xff,0xff,0xce,0x00,0x00,0x00}, - .wine_only = TRUE, - .todo = TRUE, - }, { .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, .report_buf = {3,0x01,0x02,0x08,0x78,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xff,0xff,0x4e,0x01,0x00,0x00}, - .todo = TRUE, }, }; struct hid_expect expect_create_condition[] = @@ -5554,20 +5545,11 @@ static void test_windows_gaming_input(void) .report_buf = {8,0x01,0x19,0x4c,0x14,0x00,0x3c,0x00}, }, /* update effect */ - { - .code = IOCTL_HID_WRITE_REPORT, - .report_id = 3, - .report_len = 18, - .report_buf = {3,0x01,0x04,0x08,0x5a,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xff,0x7f,0xce,0x00,0x00,0x00}, - .wine_only = TRUE, - .todo = TRUE, - }, { .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, .report_buf = {3,0x01,0x04,0x08,0x5a,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xff,0x7f,0x4e,0x01,0x00,0x00}, - .todo = TRUE, }, }; struct hid_expect expect_create_ramp[] = @@ -5601,20 +5583,11 @@ static void test_windows_gaming_input(void) .report_buf = {8,0x01,0x19,0x4c,0x14,0x00,0x3c,0x00}, }, /* update effect */ - { - .code = IOCTL_HID_WRITE_REPORT, - .report_id = 3, - .report_len = 18, - .report_buf = {3,0x01,0x05,0x08,0x5a,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xff,0xff,0xce,0x00,0x00,0x00}, - .wine_only = TRUE, - .todo = TRUE, - }, { .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 18, .report_buf = {3,0x01,0x05,0x08,0x5a,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0xff,0xff,0x4e,0x01,0x00,0x00}, - .todo = TRUE, }, }; struct hid_expect expect_effect_start =
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=114992
Your paranoid android.
=== debian11 (32 bit German report) ===
dinput: force_feedback.c:6103: Test failed: Release returned 1