mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 23:54:07 +00:00
windows.gaming.input: Implement stub IGamepad2 interface.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
This commit is contained in:
parent
e8b06de490
commit
2692e59f46
|
@ -61,6 +61,7 @@ struct gamepad
|
|||
IGameControllerImpl IGameControllerImpl_iface;
|
||||
IGameControllerInputSink IGameControllerInputSink_iface;
|
||||
IGamepad IGamepad_iface;
|
||||
IGamepad2 IGamepad2_iface;
|
||||
IGameController *IGameController_outer;
|
||||
LONG ref;
|
||||
|
||||
|
@ -99,6 +100,12 @@ static HRESULT WINAPI controller_QueryInterface( IGameControllerImpl *iface, REF
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
if (IsEqualGUID( iid, &IID_IGamepad2 ))
|
||||
{
|
||||
IInspectable_AddRef( (*out = &impl->IGamepad2_iface) );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) );
|
||||
*out = NULL;
|
||||
return E_NOINTERFACE;
|
||||
|
@ -330,6 +337,28 @@ static const struct IGamepadVtbl gamepad_vtbl =
|
|||
gamepad_GetCurrentReading,
|
||||
};
|
||||
|
||||
DEFINE_IINSPECTABLE_OUTER( gamepad2, IGamepad2, struct gamepad, IGameController_outer )
|
||||
|
||||
static HRESULT WINAPI gamepad2_GetButtonLabel( IGamepad2 *iface, GamepadButtons button, GameControllerButtonLabel *value )
|
||||
{
|
||||
FIXME( "iface %p, button %#x, value %p stub!\n", iface, button, value );
|
||||
*value = GameControllerButtonLabel_None;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const struct IGamepad2Vtbl gamepad2_vtbl =
|
||||
{
|
||||
gamepad2_QueryInterface,
|
||||
gamepad2_AddRef,
|
||||
gamepad2_Release,
|
||||
/* IInspectable methods */
|
||||
gamepad2_GetIids,
|
||||
gamepad2_GetRuntimeClassName,
|
||||
gamepad2_GetTrustLevel,
|
||||
/* IGamepad2 methods */
|
||||
gamepad2_GetButtonLabel,
|
||||
};
|
||||
|
||||
struct gamepad_statics
|
||||
{
|
||||
IActivationFactory IActivationFactory_iface;
|
||||
|
@ -542,6 +571,7 @@ static HRESULT WINAPI controller_factory_CreateGameController( ICustomGameContro
|
|||
impl->IGameControllerImpl_iface.lpVtbl = &controller_vtbl;
|
||||
impl->IGameControllerInputSink_iface.lpVtbl = &input_sink_vtbl;
|
||||
impl->IGamepad_iface.lpVtbl = &gamepad_vtbl;
|
||||
impl->IGamepad2_iface.lpVtbl = &gamepad2_vtbl;
|
||||
impl->ref = 1;
|
||||
|
||||
TRACE( "created Gamepad %p\n", impl );
|
||||
|
|
Loading…
Reference in a new issue