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

windows.gaming.input: Make QueryInterface implementations consistent.

When COM aggregation is involved it is important to add a reference to the returned iface and not to the inner object. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ebe0fce6
......@@ -46,15 +46,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID
IsEqualGUID( iid, &IID_IAgileObject ) ||
IsEqualGUID( iid, &IID_IActivationFactory ))
{
IUnknown_AddRef( iface );
*out = iface;
IInspectable_AddRef( (*out = &impl->IActivationFactory_iface) );
return S_OK;
}
if (IsEqualGUID( iid, &IID_IRawGameControllerStatics ))
{
IUnknown_AddRef( iface );
*out = &impl->IRawGameControllerStatics_iface;
IInspectable_AddRef( (*out = &impl->IRawGameControllerStatics_iface) );
return S_OK;
}
......
......@@ -46,15 +46,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID
IsEqualGUID( iid, &IID_IAgileObject ) ||
IsEqualGUID( iid, &IID_IActivationFactory ))
{
IUnknown_AddRef( iface );
*out = iface;
IInspectable_AddRef( (*out = &impl->IActivationFactory_iface) );
return S_OK;
}
if (IsEqualGUID( iid, &IID_IGamepadStatics ))
{
IUnknown_AddRef( iface );
*out = &impl->IGamepadStatics_iface;
IInspectable_AddRef( (*out = &impl->IGamepadStatics_iface) );
return S_OK;
}
......
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