From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/windows.gaming.input/async.c | 2 +- dlls/windows.gaming.input/controller.c | 2 +- dlls/windows.gaming.input/gamepad.c | 2 +- dlls/windows.gaming.input/racing_wheel.c | 2 +- dlls/windows.gaming.input/vector.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/windows.gaming.input/async.c b/dlls/windows.gaming.input/async.c index 8483f301b83..c41abe96cd1 100644 --- a/dlls/windows.gaming.input/async.c +++ b/dlls/windows.gaming.input/async.c @@ -73,7 +73,7 @@ static HRESULT WINAPI async_impl_QueryInterface( IWineAsyncInfoImpl *iface, REFI return S_OK; }
- WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } diff --git a/dlls/windows.gaming.input/controller.c b/dlls/windows.gaming.input/controller.c index e372ea6c9bf..bd3d441c445 100644 --- a/dlls/windows.gaming.input/controller.c +++ b/dlls/windows.gaming.input/controller.c @@ -99,7 +99,7 @@ static HRESULT WINAPI controller_QueryInterface( IGameControllerImpl *iface, REF return S_OK; }
- WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } diff --git a/dlls/windows.gaming.input/gamepad.c b/dlls/windows.gaming.input/gamepad.c index 0c38fb5cd1a..5efc9f13ea8 100644 --- a/dlls/windows.gaming.input/gamepad.c +++ b/dlls/windows.gaming.input/gamepad.c @@ -99,7 +99,7 @@ static HRESULT WINAPI controller_QueryInterface( IGameControllerImpl *iface, REF return S_OK; }
- WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } diff --git a/dlls/windows.gaming.input/racing_wheel.c b/dlls/windows.gaming.input/racing_wheel.c index 4a494775dc2..d646ca26c03 100644 --- a/dlls/windows.gaming.input/racing_wheel.c +++ b/dlls/windows.gaming.input/racing_wheel.c @@ -99,7 +99,7 @@ static HRESULT WINAPI controller_QueryInterface( IGameControllerImpl *iface, REF return S_OK; }
- WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } diff --git a/dlls/windows.gaming.input/vector.c b/dlls/windows.gaming.input/vector.c index db1a9057682..8958b07c0f2 100644 --- a/dlls/windows.gaming.input/vector.c +++ b/dlls/windows.gaming.input/vector.c @@ -54,7 +54,7 @@ static HRESULT WINAPI iterator_QueryInterface( IIterator_IInspectable *iface, RE return S_OK; }
- WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } @@ -189,7 +189,7 @@ static HRESULT WINAPI vector_view_QueryInterface( IVectorView_IInspectable *ifac return S_OK; }
- WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } @@ -384,7 +384,7 @@ static HRESULT WINAPI vector_QueryInterface( IVector_IInspectable *iface, REFIID return S_OK; }
- WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; }
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- include/windows.gaming.input.idl | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/include/windows.gaming.input.idl b/include/windows.gaming.input.idl index fdae3aa70b1..5fc5265247d 100644 --- a/include/windows.gaming.input.idl +++ b/include/windows.gaming.input.idl @@ -446,6 +446,19 @@ namespace Windows.Gaming.Input { HRESULT GetCurrentReading([out, retval] Windows.Gaming.Input.GamepadReading *value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.Gaming.Input.Gamepad), + uuid(3c1689bd-5915-4245-b0c0-c89fae0308ff) + ] + interface IGamepad2 : IInspectable + requires Windows.Gaming.Input.IGamepad, + Windows.Gaming.Input.IGameController + { + HRESULT GetButtonLabel([in] Windows.Gaming.Input.GamepadButtons button, + [out, retval] Windows.Gaming.Input.GameControllerButtonLabel *value); + } + [ contract(Windows.Foundation.UniversalApiContract, 3.0), exclusiveto(Windows.Gaming.Input.RacingWheel),
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/windows.gaming.input/gamepad.c | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/dlls/windows.gaming.input/gamepad.c b/dlls/windows.gaming.input/gamepad.c index 5efc9f13ea8..112ec49a1d3 100644 --- a/dlls/windows.gaming.input/gamepad.c +++ b/dlls/windows.gaming.input/gamepad.c @@ -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 );
Bernhard Kölbl (@besentv) commented about dlls/windows.gaming.input/async.c:
return S_OK; }
- WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) );
I think warning on an unimplemented iface is actually a good thing, so I'd be against this change.
On Wed Jun 8 11:52:19 2022 +0000, Bernhard Kölbl wrote:
I think warning on an unimplemented iface is actually a good thing, so I'd be against this change.
Well this missing interface caused Death Stranding to crash, and it wasn't obvious that it was because of a missing iface since WARN messages aren't printed by default in the logs. Using FIXME instead would have made it obvious.
On Wed Jun 8 11:57:28 2022 +0000, Rémi Bernon wrote:
Well this missing interface caused Death Stranding to crash, and it wasn't obvious that it was because of a missing iface since WARN messages aren't printed by default in the logs. Using FIXME instead would have made it obvious.
Alright, I somehow had the impression, that WARNs are logged by default.