Rémi Bernon : windows.gaming.input: Fix IIterator_IInspectable_MoveNext returne value.

Alexandre Julliard julliard at winehq.org
Mon Mar 14 17:47:37 CDT 2022


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Mon Mar 14 10:28:14 2022 +0100

windows.gaming.input: Fix IIterator_IInspectable_MoveNext returne value.

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

---

 dlls/dinput/tests/hotplug.c        | 1 -
 dlls/windows.gaming.input/vector.c | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/dinput/tests/hotplug.c b/dlls/dinput/tests/hotplug.c
index 8a27f16932f..3580964e187 100644
--- a/dlls/dinput/tests/hotplug.c
+++ b/dlls/dinput/tests/hotplug.c
@@ -1095,7 +1095,6 @@ static void test_windows_gaming_input(void)
     ok( ret == TRUE, "got HasCurrent %u\n", ret );
     hr = IIterator_RawGameController_MoveNext( iterator, &ret );
     ok( hr == S_OK, "First returned %#lx\n", hr );
-    todo_wine
     ok( ret == FALSE, "got MoveNext %u\n", ret );
     hr = IIterator_RawGameController_get_HasCurrent( iterator, &ret );
     ok( hr == S_OK, "First returned %#lx\n", hr );
diff --git a/dlls/windows.gaming.input/vector.c b/dlls/windows.gaming.input/vector.c
index 10dac5a5547..ae83d16a384 100644
--- a/dlls/windows.gaming.input/vector.c
+++ b/dlls/windows.gaming.input/vector.c
@@ -126,8 +126,8 @@ static HRESULT WINAPI iterator_MoveNext( IIterator_IInspectable *iface, BOOL *va
 
     FIXME("\n");
 
-    if ((*value = impl->index < impl->size)) impl->index++;
-    return S_OK;
+    if (impl->index < impl->size) impl->index++;
+    return IIterator_IInspectable_get_HasCurrent( iface, value );
 }
 
 static HRESULT WINAPI iterator_GetMany( IIterator_IInspectable *iface, UINT32 items_size,




More information about the wine-cvs mailing list