diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 068f5bf1a7e..e4d17175c68 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5283,10 +5283,8 @@ static void test_windows_gaming_input(void) set_hid_expect( file, expect_acquire, sizeof(expect_acquire) ); hr = IRawGameController_get_ForceFeedbackMotors( raw_controller, &motors_view ); - todo_wine ok( hr == S_OK, "get_ForceFeedbackMotors returned %#lx\n", hr ); wait_hid_expect_( __FILE__, __LINE__, file, 100, TRUE ); /* device gain reports are written asynchronously */ - if (!motors_view) goto skip_tests; hr = IVectorView_ForceFeedbackMotor_get_Size( motors_view, &size ); ok( hr == S_OK, "get_Size returned %#lx\n", hr ); @@ -5296,6 +5294,7 @@ static void test_windows_gaming_input(void) todo_wine ok( hr == S_OK, "GetAt returned %#lx\n", hr ); IVectorView_ForceFeedbackMotor_Release( motors_view ); + if (hr != S_OK) goto skip_tests; check_interface( motor, &IID_IUnknown, TRUE ); check_interface( motor, &IID_IInspectable, TRUE ); diff --git a/dlls/windows.gaming.input/controller.c b/dlls/windows.gaming.input/controller.c index 03a3ae398cf..d68da6b3142 100644 --- a/dlls/windows.gaming.input/controller.c +++ b/dlls/windows.gaming.input/controller.c @@ -229,8 +229,23 @@ static HRESULT WINAPI raw_controller_get_ButtonCount( IRawGameController *iface, static HRESULT WINAPI raw_controller_get_ForceFeedbackMotors( IRawGameController *iface, IVectorView_ForceFeedbackMotor **value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + static const struct vector_iids iids = + { + .vector = &IID_IVector_ForceFeedbackMotor, + .view = &IID_IVectorView_ForceFeedbackMotor, + .iterable = &IID_IIterable_ForceFeedbackMotor, + .iterator = &IID_IIterator_ForceFeedbackMotor, + }; + IVector_ForceFeedbackMotor *vector; + HRESULT hr; + + TRACE( "iface %p, value %p\n", iface, value ); + + if (FAILED(hr = vector_create( &iids, (void **)&vector ))) return hr; + hr = IVector_ForceFeedbackMotor_GetView( vector, value ); + IVector_ForceFeedbackMotor_Release( vector ); + + return hr; } static HRESULT WINAPI raw_controller_get_HardwareProductId( IRawGameController *iface, UINT16 *value ) diff --git a/include/windows.gaming.input.forcefeedback.idl b/include/windows.gaming.input.forcefeedback.idl index 432b60a5592..639e0c5cd57 100644 --- a/include/windows.gaming.input.forcefeedback.idl +++ b/include/windows.gaming.input.forcefeedback.idl @@ -36,7 +36,10 @@ namespace Windows.Gaming.Input.ForceFeedback { declare { interface Windows.Foundation.AsyncOperationCompletedHandler; interface Windows.Foundation.IAsyncOperation; + interface Windows.Foundation.Collections.IIterator; + interface Windows.Foundation.Collections.IIterable; interface Windows.Foundation.Collections.IVectorView; + interface Windows.Foundation.Collections.IVector; } [