windows.gaming.input: Fake IEventHandler_RawGameController support.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5f4c28ea4b
commit
e2189f588f
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue