Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2692e59f
Commit
2692e59f
authored
Jun 08, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.gaming.input: Implement stub IGamepad2 interface.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
e8b06de4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
gamepad.c
dlls/windows.gaming.input/gamepad.c
+30
-0
No files found.
dlls/windows.gaming.input/gamepad.c
View file @
2692e59f
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment