On 3/19/21 9:55 AM, Rémi Bernon wrote:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
dlls/windows.gaming.input/main.c | 14 ++++++++++---- dlls/windows.gaming.input/tests/input.c | 17 +++++++++++------ 2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/dlls/windows.gaming.input/main.c b/dlls/windows.gaming.input/main.c index d7a2f138a14..d3533b91266 100644 --- a/dlls/windows.gaming.input/main.c +++ b/dlls/windows.gaming.input/main.c @@ -321,28 +321,34 @@ static HRESULT STDMETHODCALLTYPE gamepad_statics_add_GamepadAdded( IGamepadStatics *iface, IEventHandler_Gamepad *value, EventRegistrationToken* token) { FIXME("iface %p, value %p, token %p stub!\n", iface, value, token);
- return E_NOTIMPL;
if (!value) return E_INVALIDARG;
if (!token) return E_POINTER;
token->value = 0;
return S_OK; }
static HRESULT STDMETHODCALLTYPE gamepad_statics_remove_GamepadAdded( IGamepadStatics *iface, EventRegistrationToken token) { FIXME("iface %p, token %#I64x stub!\n", iface, token.value);
- return E_NOTIMPL;
return S_OK; }
static HRESULT STDMETHODCALLTYPE gamepad_statics_add_GamepadRemoved( IGamepadStatics *iface, IEventHandler_Gamepad *value, EventRegistrationToken* token) { FIXME("iface %p, value %p, token %p stub!\n", iface, value, token);
- return E_NOTIMPL;
if (!value) return E_INVALIDARG;
if (!token) return E_POINTER;
token->value = 0;
return S_OK; }
static HRESULT STDMETHODCALLTYPE gamepad_statics_remove_GamepadRemoved( IGamepadStatics *iface, EventRegistrationToken token) { FIXME("iface %p, token %#I64x stub!\n", iface, token.value);
- return E_NOTIMPL;
return S_OK; }
static HRESULT STDMETHODCALLTYPE gamepad_statics_get_Gamepads(
diff --git a/dlls/windows.gaming.input/tests/input.c b/dlls/windows.gaming.input/tests/input.c index 622da229e70..b164ed5bd51 100644 --- a/dlls/windows.gaming.input/tests/input.c +++ b/dlls/windows.gaming.input/tests/input.c @@ -188,19 +188,24 @@ static void test_Gamepad(void)
token.value = 0xdeadbeef; hr = IGamepadStatics_add_GamepadAdded(gamepad_statics, &gamepad_event_handler.IEventHandler_Gamepad_iface, &token);
- todo_wine ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
- todo_wine ok(token.value != 0xdeadbeef, "IGamepadStatics_add_GamepadAdded returned token %#I64x\n", token.value);
ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
ok(token.value != 0xdeadbeef, "IGamepadStatics_add_GamepadAdded returned token %#I64x\n", token.value);
hr = IGamepadStatics_remove_GamepadAdded(gamepad_statics, token);
- todo_wine ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
token.value = 0xdeadbeef; IGamepadStatics_add_GamepadRemoved(gamepad_statics, &gamepad_event_handler.IEventHandler_Gamepad_iface, &token);
- todo_wine ok(hr == S_OK, "IGamepadStatics_add_GamepadRemoved failed, hr %#x\n", hr);
- todo_wine ok(token.value != 0xdeadbeef, "IGamepadStatics_add_GamepadRemoved returned token %#I64x\n", token.value);
ok(hr == S_OK, "IGamepadStatics_add_GamepadRemoved failed, hr %#x\n", hr);
ok(token.value != 0xdeadbeef, "IGamepadStatics_add_GamepadRemoved returned token %#I64x\n", token.value);
hr = IGamepadStatics_remove_GamepadRemoved(gamepad_statics, token);
- todo_wine ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
hr = IGamepadStatics_add_GamepadAdded(gamepad_statics, NULL, &token);
ok(hr == E_INVALIDARG, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
hr = IGamepadStatics_add_GamepadAdded(gamepad_statics, &gamepad_event_handler.IEventHandler_Gamepad_iface, NULL);
ok(hr == E_POINTER, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
IGamepadStatics_Release(gamepad_statics);
Crap, I tested this before but maybe not on all windows versions and the hr == E_POINTER case actually crashes too on most recent windows... I'll remove the test.