Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/tests/hotplug.c | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/dlls/dinput/tests/hotplug.c b/dlls/dinput/tests/hotplug.c index a2072ca16de..8a27f16932f 100644 --- a/dlls/dinput/tests/hotplug.c +++ b/dlls/dinput/tests/hotplug.c @@ -961,6 +961,8 @@ static void test_windows_gaming_input(void) EventRegistrationToken controller_removed_token; IVectorView_RawGameController *controller_view; EventRegistrationToken controller_added_token; + IIterable_RawGameController *iterable; + IIterator_RawGameController *iterator; IRawGameControllerStatics *statics; HANDLE hwnd, thread, stop_event; IInspectable *tmp_inspectable; @@ -968,7 +970,8 @@ static void test_windows_gaming_input(void) HSTRING str; UINT32 size; HRESULT hr; - DWORD ret; + DWORD res; + BOOL ret; MSG msg;
if (!load_combase_functions()) return; @@ -1080,6 +1083,28 @@ static void test_windows_gaming_input(void) ok( hr == S_OK, "get_Size returned %#lx\n", hr ); ok( size == 1, "got size %u\n", size );
+ hr = IVectorView_RawGameController_QueryInterface( controller_view, &IID_IIterable_RawGameController, + (void **)&iterable ); + ok( hr == S_OK, "QueryInterface returned %#lx\n", hr ); + hr = IIterable_RawGameController_First( iterable, &iterator ); + ok( hr == S_OK, "First returned %#lx\n", hr ); + IIterable_RawGameController_Release( iterable ); + + hr = IIterator_RawGameController_get_HasCurrent( iterator, &ret ); + ok( hr == S_OK, "First returned %#lx\n", hr ); + 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 ); + ok( ret == FALSE, "got MoveNext %u\n", ret ); + hr = IIterator_RawGameController_MoveNext( iterator, &ret ); + ok( hr == S_OK, "First returned %#lx\n", hr ); + ok( ret == FALSE, "got MoveNext %u\n", ret ); + IIterator_RawGameController_Release( iterator ); + IVectorView_RawGameController_Release( controller_view ); hr = IRawGameControllerStatics_get_RawGameControllers( statics, &controller_view ); ok( hr == S_OK, "get_RawGameControllers returned %#lx\n", hr ); @@ -1112,9 +1137,9 @@ static void test_windows_gaming_input(void) thread = CreateThread( NULL, 0, dinput_test_device_thread, stop_event, 0, NULL ); ok( !!thread, "CreateThread failed, error %lu\n", GetLastError() ); wait_for_events( 1, &controller_added.event, INFINITE ); - ret = wait_for_events( 1, &custom_factory.added_event, 500 ); + res = wait_for_events( 1, &custom_factory.added_event, 500 ); todo_wine - ok( !ret, "wait_for_events returned %#lx\n", ret ); + ok( !res, "wait_for_events returned %#lx\n", res ); hr = IRawGameControllerStatics_get_RawGameControllers( statics, &controller_view ); ok( hr == S_OK, "get_RawGameControllers returned %#lx\n", hr ); hr = IVectorView_RawGameController_GetAt( controller_view, 0, &raw_controller ); @@ -1159,9 +1184,9 @@ next: IGameController_Release( game_controller ); IRawGameController_Release( raw_controller ); SetEvent( stop_event ); - ret = wait_for_events( 1, &custom_factory.removed_event, 500 ); + res = wait_for_events( 1, &custom_factory.removed_event, 500 ); todo_wine - ok( !ret, "wait_for_events returned %#lx\n", ret ); + ok( !res, "wait_for_events returned %#lx\n", res ); wait_for_events( 1, &controller_removed.event, INFINITE );
hr = IRawGameControllerStatics_remove_RawGameControllerAdded( statics, controller_added_token );
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- 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,
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/windows.gaming.input/vector.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/dlls/windows.gaming.input/vector.c b/dlls/windows.gaming.input/vector.c index ae83d16a384..c98c89195d1 100644 --- a/dlls/windows.gaming.input/vector.c +++ b/dlls/windows.gaming.input/vector.c @@ -104,9 +104,7 @@ static HRESULT WINAPI iterator_GetTrustLevel( IIterator_IInspectable *iface, Tru static HRESULT WINAPI iterator_get_Current( IIterator_IInspectable *iface, IInspectable **value ) { struct iterator *impl = impl_from_IIterator_IInspectable( iface ); - - FIXME("\n"); - + TRACE( "iface %p, value %p.\n", iface, value ); return IVectorView_IInspectable_GetAt( impl->view, impl->index, value ); }
@@ -114,7 +112,7 @@ static HRESULT WINAPI iterator_get_HasCurrent( IIterator_IInspectable *iface, BO { struct iterator *impl = impl_from_IIterator_IInspectable( iface );
- FIXME("\n"); + TRACE( "iface %p, value %p.\n", iface, value );
*value = impl->index < impl->size; return S_OK; @@ -124,7 +122,7 @@ static HRESULT WINAPI iterator_MoveNext( IIterator_IInspectable *iface, BOOL *va { struct iterator *impl = impl_from_IIterator_IInspectable( iface );
- FIXME("\n"); + TRACE( "iface %p, value %p.\n", iface, value );
if (impl->index < impl->size) impl->index++; return IIterator_IInspectable_get_HasCurrent( iface, value ); @@ -134,9 +132,7 @@ static HRESULT WINAPI iterator_GetMany( IIterator_IInspectable *iface, UINT32 it IInspectable **items, UINT *count ) { struct iterator *impl = impl_from_IIterator_IInspectable( iface ); - - FIXME("\n"); - + TRACE( "iface %p, items_size %u, items %p, count %p.\n", iface, items_size, items, count ); return IVectorView_IInspectable_GetMany( impl->view, impl->index, items_size, items, count ); }
@@ -635,7 +631,7 @@ static HRESULT WINAPI iterable_First( IIterable_IInspectable *iface, IIterator_I IVectorView_IInspectable *view; HRESULT hr;
- TRACE("\n"); + TRACE( "iface %p, value %p.\n", iface, value );
if (FAILED(hr = IVector_IInspectable_GetView( &impl->IVector_IInspectable_iface, &view ))) return hr;
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=110413
Your paranoid android.
=== w7u_adm (testbot log) ===
WineRunTask.pl:error: The previous 2 run(s) terminated abnormally