Rémi Bernon : windows.gaming.input: Fake empty IRawGameControllerStatics::RawGameControllers vector.

Alexandre Julliard julliard at winehq.org
Mon Mar 22 17:15:51 CDT 2021


Module: wine
Branch: master
Commit: 5f4c28ea4b60bc627ec37ced877af923266955a5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5f4c28ea4b60bc627ec37ced877af923266955a5

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Mon Mar 22 11:17:34 2021 +0100

windows.gaming.input: Fake empty IRawGameControllerStatics::RawGameControllers vector.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/windows.gaming.input/main.c        | 10 +++++++---
 dlls/windows.gaming.input/tests/input.c | 12 ++++++------
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/dlls/windows.gaming.input/main.c b/dlls/windows.gaming.input/main.c
index 69839e06558..56c5ad20ab0 100644
--- a/dlls/windows.gaming.input/main.c
+++ b/dlls/windows.gaming.input/main.c
@@ -244,21 +244,25 @@ static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_GetAt(
     IVectorView_RawGameController *iface, ULONG index, IRawGameController **value)
 {
     FIXME("iface %p, index %#x, value %p stub!\n", iface, index, value);
-    return E_NOTIMPL;
+    *value = NULL;
+    return E_BOUNDS;
 }
 
 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_get_Size(
     IVectorView_RawGameController *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_raw_game_controller_IndexOf(
     IVectorView_RawGameController *iface, IRawGameController *element, ULONG *index, BOOLEAN *found)
 {
     FIXME("iface %p, element %p, index %p, found %p stub!\n", iface, element, index, found);
-    return E_NOTIMPL;
+    *index = 0;
+    *found = FALSE;
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_GetMany(
diff --git a/dlls/windows.gaming.input/tests/input.c b/dlls/windows.gaming.input/tests/input.c
index 1344d885ecb..a359f225728 100644
--- a/dlls/windows.gaming.input/tests/input.c
+++ b/dlls/windows.gaming.input/tests/input.c
@@ -340,20 +340,20 @@ static void test_RawGameController(void)
 
     size = 0xdeadbeef;
     hr = IVectorView_RawGameController_get_Size(controllers, &size);
-    todo_wine ok(hr == S_OK, "IVectorView_RawGameController_get_Size failed, hr %#x\n", hr);
-    todo_wine ok(size != 0xdeadbeef, "IVectorView_RawGameController_get_Size returned %u\n", size);
+    ok(hr == S_OK, "IVectorView_RawGameController_get_Size failed, hr %#x\n", hr);
+    ok(size != 0xdeadbeef, "IVectorView_RawGameController_get_Size returned %u\n", size);
 
     controller = (IRawGameController *)0xdeadbeef;
     hr = IVectorView_RawGameController_GetAt(controllers, size, &controller);
-    todo_wine ok(hr == E_BOUNDS, "IVectorView_RawGameController_GetAt failed, hr %#x\n", hr);
-    todo_wine ok(controller == NULL, "IVectorView_RawGameController_GetAt returned %p\n", controller);
+    ok(hr == E_BOUNDS, "IVectorView_RawGameController_GetAt failed, hr %#x\n", hr);
+    ok(controller == NULL, "IVectorView_RawGameController_GetAt returned %p\n", controller);
 
     size = 0xdeadbeef;
     found = TRUE;
     controller = (IRawGameController *)0xdeadbeef;
     hr = IVectorView_RawGameController_IndexOf(controllers, controller, &size, &found);
-    todo_wine ok(hr == S_OK, "IVectorView_RawGameController_IndexOf failed, hr %#x\n", hr);
-    todo_wine ok(size == 0 && found == FALSE, "IVectorView_RawGameController_IndexOf returned size %d, found %d\n", size, found);
+    ok(hr == S_OK, "IVectorView_RawGameController_IndexOf failed, hr %#x\n", hr);
+    ok(size == 0 && found == FALSE, "IVectorView_RawGameController_IndexOf returned size %d, found %d\n", size, found);
 
     IVectorView_RawGameController_Release(controllers);
 




More information about the wine-cvs mailing list