[PATCH 7/7] windows.gaming.input: Fake empty IGamepadStatics::Gamepads vector.

Rémi Bernon rbernon at codeweavers.com
Wed Mar 17 07:07:08 CDT 2021


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/windows.gaming.input/main.c          | 11 +++++++----
 dlls/windows.gaming.input/tests/statics.c |  4 ++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/dlls/windows.gaming.input/main.c b/dlls/windows.gaming.input/main.c
index 5e349d98fab..b1ba55f9018 100644
--- a/dlls/windows.gaming.input/main.c
+++ b/dlls/windows.gaming.input/main.c
@@ -120,28 +120,31 @@ static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetAt(
     IVectorView_Gamepad *iface, ULONG index, IGamepad **value)
 {
     FIXME("iface %p, index %#x, value %p stub!\n", iface, index, value);
-    return E_NOTIMPL;
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_get_Size(
     IVectorView_Gamepad *iface, ULONG *value)
 {
     FIXME("iface %p, value %p stub!\n", iface, value);
-    return E_NOTIMPL;
+    *value = 0;
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_IndexOf(
     IVectorView_Gamepad *iface, IGamepad *element, ULONG *index, BOOLEAN *value)
 {
     FIXME("iface %p, element %p, index %p, value %p stub!\n", iface, element, index, value);
-    return E_NOTIMPL;
+    *value = FALSE;
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetMany(
     IVectorView_Gamepad *iface, ULONG start_index, IGamepad **items, UINT *value)
 {
     FIXME("iface %p, start_index %#x, items %p, value %p stub!\n", iface, start_index, items, value);
-    return E_NOTIMPL;
+    *value = 0;
+    return S_OK;
 }
 
 static const struct IVectorView_GamepadVtbl vector_view_gamepad_vtbl =
diff --git a/dlls/windows.gaming.input/tests/statics.c b/dlls/windows.gaming.input/tests/statics.c
index 699cf6fc9f7..f381a015fe7 100644
--- a/dlls/windows.gaming.input/tests/statics.c
+++ b/dlls/windows.gaming.input/tests/statics.c
@@ -102,8 +102,8 @@ static void test_Gamepad(void)
 
     size = 0xdeadbeef;
     hr = IVectorView_Gamepad_get_Size(gamepads, &size);
-    todo_wine ok(SUCCEEDED(hr), "IVectorView_Gamepad_QueryInterface failed, hr %#x\n", hr);
-    todo_wine ok(size != 0xdeadbeef, "IVectorView_Gamepad_get_Size returned %u\n", size);
+    ok(SUCCEEDED(hr), "IVectorView_Gamepad_QueryInterface failed, hr %#x\n", hr);
+    ok(size != 0xdeadbeef, "IVectorView_Gamepad_get_Size returned %u\n", size);
 
     rc = IVectorView_Gamepad_Release(gamepads);
     todo_wine ok(rc == 1, "IVectorView_Gamepad_Release returned unexpected refcount %d\n", rc);
-- 
2.30.2




More information about the wine-devel mailing list