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
00ff428b
Commit
00ff428b
authored
Mar 07, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.gaming.input: Stub ICustomGameControllerFactory for Gamepad.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5adbc011
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
3 deletions
+47
-3
gamepad.c
dlls/windows.gaming.input/gamepad.c
+45
-1
main.c
dlls/windows.gaming.input/main.c
+1
-1
private.h
dlls/windows.gaming.input/private.h
+1
-1
No files found.
dlls/windows.gaming.input/gamepad.c
View file @
00ff428b
...
...
@@ -27,6 +27,7 @@ struct gamepad_statics
{
IActivationFactory
IActivationFactory_iface
;
IGamepadStatics
IGamepadStatics_iface
;
ICustomGameControllerFactory
ICustomGameControllerFactory_iface
;
LONG
ref
;
};
...
...
@@ -56,6 +57,12 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID
return
S_OK
;
}
if
(
IsEqualGUID
(
iid
,
&
IID_ICustomGameControllerFactory
))
{
IInspectable_AddRef
(
(
*
out
=
&
impl
->
ICustomGameControllerFactory_iface
)
);
return
S_OK
;
}
FIXME
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
)
);
*
out
=
NULL
;
return
E_NOINTERFACE
;
...
...
@@ -181,11 +188,48 @@ static const struct IGamepadStaticsVtbl statics_vtbl =
statics_get_Gamepads
,
};
DEFINE_IINSPECTABLE
(
controller_factory
,
ICustomGameControllerFactory
,
struct
gamepad_statics
,
IActivationFactory_iface
)
static
HRESULT
WINAPI
controller_factory_CreateGameController
(
ICustomGameControllerFactory
*
iface
,
IGameControllerProvider
*
provider
,
IInspectable
**
value
)
{
FIXME
(
"iface %p, provider %p, value %p stub!
\n
"
,
iface
,
provider
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
controller_factory_OnGameControllerAdded
(
ICustomGameControllerFactory
*
iface
,
IGameController
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
controller_factory_OnGameControllerRemoved
(
ICustomGameControllerFactory
*
iface
,
IGameController
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
const
struct
ICustomGameControllerFactoryVtbl
controller_factory_vtbl
=
{
controller_factory_QueryInterface
,
controller_factory_AddRef
,
controller_factory_Release
,
/* IInspectable methods */
controller_factory_GetIids
,
controller_factory_GetRuntimeClassName
,
controller_factory_GetTrustLevel
,
/* ICustomGameControllerFactory methods */
controller_factory_CreateGameController
,
controller_factory_OnGameControllerAdded
,
controller_factory_OnGameControllerRemoved
,
};
static
struct
gamepad_statics
gamepad_statics
=
{
{
&
factory_vtbl
},
{
&
statics_vtbl
},
{
&
controller_factory_vtbl
},
1
,
};
I
ActivationFactory
*
gamepad_factory
=
&
gamepad_statics
.
IActivation
Factory_iface
;
I
CustomGameControllerFactory
*
gamepad_factory
=
&
gamepad_statics
.
ICustomGameController
Factory_iface
;
dlls/windows.gaming.input/main.c
View file @
00ff428b
...
...
@@ -180,7 +180,7 @@ HRESULT WINAPI DllGetActivationFactory( HSTRING class_str, IActivationFactory **
if
(
!
wcscmp
(
buffer
,
RuntimeClass_Windows_Gaming_Input_RawGameController
))
hr
=
ICustomGameControllerFactory_QueryInterface
(
controller_factory
,
&
IID_IActivationFactory
,
(
void
**
)
factory
);
if
(
!
wcscmp
(
buffer
,
RuntimeClass_Windows_Gaming_Input_Gamepad
))
IActivationFactory_AddRef
(
(
*
factory
=
gamepad_factory
)
);
hr
=
ICustomGameControllerFactory_QueryInterface
(
gamepad_factory
,
&
IID_IActivationFactory
,
(
void
**
)
factory
);
if
(
!
wcscmp
(
buffer
,
RuntimeClass_Windows_Gaming_Input_Custom_GameControllerFactoryManager
))
IActivationFactory_AddRef
(
(
*
factory
=
manager_factory
)
);
...
...
dlls/windows.gaming.input/private.h
View file @
00ff428b
...
...
@@ -37,7 +37,7 @@
extern
HINSTANCE
windows_gaming_input
;
extern
ICustomGameControllerFactory
*
controller_factory
;
extern
I
Activation
Factory
*
gamepad_factory
;
extern
I
CustomGameController
Factory
*
gamepad_factory
;
extern
IActivationFactory
*
manager_factory
;
extern
HRESULT
vector_create
(
REFIID
iid
,
REFIID
view_iid
,
void
**
out
);
...
...
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