Commit e2189f58 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

windows.gaming.input: Fake IEventHandler_RawGameController support.

parent 5f4c28ea
......@@ -558,28 +558,32 @@ static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_add_RawGameControll
IRawGameControllerStatics *iface, IEventHandler_RawGameController *value, EventRegistrationToken* token)
{
FIXME("iface %p, value %p, token %p stub!\n", iface, value, token);
return E_NOTIMPL;
if (!value) return E_INVALIDARG;
token->value = 0;
return S_OK;
}
static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_remove_RawGameControllerAdded(
IRawGameControllerStatics *iface, EventRegistrationToken token)
{
FIXME("iface %p, token %#I64x stub!\n", iface, token.value);
return E_NOTIMPL;
return S_OK;
}
static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_add_RawGameControllerRemoved(
IRawGameControllerStatics *iface, IEventHandler_RawGameController *value, EventRegistrationToken* token)
{
FIXME("iface %p, value %p, token %p stub!\n", iface, value, token);
return E_NOTIMPL;
if (!value) return E_INVALIDARG;
token->value = 0;
return S_OK;
}
static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_remove_RawGameControllerRemoved(
IRawGameControllerStatics *iface, EventRegistrationToken token)
{
FIXME("iface %p, token %#I64x stub!\n", iface, token.value);
return E_NOTIMPL;
return S_OK;
}
static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_get_RawGameControllers(
......
......@@ -359,19 +359,22 @@ static void test_RawGameController(void)
token.value = 0xdeadbeef;
hr = IRawGameControllerStatics_add_RawGameControllerAdded(controller_statics, &controller_event_handler.IEventHandler_RawGameController_iface, &token);
todo_wine ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
todo_wine ok(token.value != 0xdeadbeef, "IRawGameControllerStatics_add_RawGameControllerAdded returned token %#I64x\n", token.value);
ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
ok(token.value != 0xdeadbeef, "IRawGameControllerStatics_add_RawGameControllerAdded returned token %#I64x\n", token.value);
hr = IRawGameControllerStatics_remove_RawGameControllerAdded(controller_statics, token);
todo_wine ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
token.value = 0xdeadbeef;
IRawGameControllerStatics_add_RawGameControllerRemoved(controller_statics, &controller_event_handler.IEventHandler_RawGameController_iface, &token);
todo_wine ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerRemoved failed, hr %#x\n", hr);
todo_wine ok(token.value != 0xdeadbeef, "IRawGameControllerStatics_add_RawGameControllerRemoved returned token %#I64x\n", token.value);
ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerRemoved failed, hr %#x\n", hr);
ok(token.value != 0xdeadbeef, "IRawGameControllerStatics_add_RawGameControllerRemoved returned token %#I64x\n", token.value);
hr = IRawGameControllerStatics_remove_RawGameControllerRemoved(controller_statics, token);
todo_wine ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
hr = IRawGameControllerStatics_add_RawGameControllerAdded(controller_statics, NULL, &token);
ok(hr == E_INVALIDARG, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
IRawGameControllerStatics_Release(controller_statics);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment