Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ac1c3471
Commit
ac1c3471
authored
Apr 21, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.gaming.input: Link directly to combase.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b70f9680
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
41 deletions
+11
-41
Makefile.in
dlls/windows.gaming.input/tests/Makefile.in
+1
-1
input.c
dlls/windows.gaming.input/tests/input.c
+10
-40
No files found.
dlls/windows.gaming.input/tests/Makefile.in
View file @
ac1c3471
TESTDLL
=
windows.gaming.input.dll
IMPORTS
=
uuid
IMPORTS
=
combase
uuid
C_SRCS
=
\
input.c
dlls/windows.gaming.input/tests/input.c
View file @
ac1c3471
...
...
@@ -34,13 +34,6 @@
#include "wine/test.h"
static
HRESULT
(
WINAPI
*
pRoActivateInstance
)(
HSTRING
,
IInspectable
**
);
static
HRESULT
(
WINAPI
*
pRoGetActivationFactory
)(
HSTRING
,
REFIID
,
void
**
);
static
HRESULT
(
WINAPI
*
pRoInitialize
)(
RO_INIT_TYPE
);
static
void
(
WINAPI
*
pRoUninitialize
)(
void
);
static
HRESULT
(
WINAPI
*
pWindowsCreateString
)(
LPCWSTR
,
UINT32
,
HSTRING
*
);
static
HRESULT
(
WINAPI
*
pWindowsDeleteString
)(
HSTRING
);
struct
gamepad_event_handler
{
IEventHandler_Gamepad
IEventHandler_Gamepad_iface
;
...
...
@@ -119,13 +112,13 @@ static void test_Gamepad(void)
gamepad_event_handler
.
IEventHandler_Gamepad_iface
.
lpVtbl
=
&
gamepad_event_handler_vtbl
;
hr
=
p
RoInitialize
(
RO_INIT_MULTITHREADED
);
hr
=
RoInitialize
(
RO_INIT_MULTITHREADED
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#x
\n
"
,
hr
);
hr
=
p
WindowsCreateString
(
gamepad_name
,
wcslen
(
gamepad_name
),
&
str
);
hr
=
WindowsCreateString
(
gamepad_name
,
wcslen
(
gamepad_name
),
&
str
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x
\n
"
,
hr
);
hr
=
p
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
hr
=
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
"RoGetActivationFactory failed, hr %#x
\n
"
,
hr
);
if
(
hr
==
REGDB_E_CLASSNOTREG
)
{
...
...
@@ -213,9 +206,9 @@ static void test_Gamepad(void)
IInspectable_Release
(
inspectable
);
IActivationFactory_Release
(
factory
);
p
WindowsDeleteString
(
str
);
WindowsDeleteString
(
str
);
p
RoUninitialize
();
RoUninitialize
();
}
struct
controller_event_handler
...
...
@@ -296,13 +289,13 @@ static void test_RawGameController(void)
controller_event_handler
.
IEventHandler_RawGameController_iface
.
lpVtbl
=
&
controller_event_handler_vtbl
;
hr
=
p
RoInitialize
(
RO_INIT_MULTITHREADED
);
hr
=
RoInitialize
(
RO_INIT_MULTITHREADED
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"RoInitialize failed, hr %#x
\n
"
,
hr
);
hr
=
p
WindowsCreateString
(
controller_name
,
wcslen
(
controller_name
),
&
str
);
hr
=
WindowsCreateString
(
controller_name
,
wcslen
(
controller_name
),
&
str
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x
\n
"
,
hr
);
hr
=
p
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
hr
=
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
"RoGetActivationFactory failed, hr %#x
\n
"
,
hr
);
if
(
hr
==
REGDB_E_CLASSNOTREG
)
{
...
...
@@ -390,36 +383,13 @@ static void test_RawGameController(void)
IInspectable_Release
(
inspectable
);
IActivationFactory_Release
(
factory
);
p
WindowsDeleteString
(
str
);
WindowsDeleteString
(
str
);
p
RoUninitialize
();
RoUninitialize
();
}
START_TEST
(
input
)
{
HMODULE
combase
;
if
(
!
(
combase
=
LoadLibraryW
(
L"combase.dll"
)))
{
win_skip
(
"Failed to load combase.dll, skipping tests
\n
"
);
return
;
}
#define LOAD_FUNCPTR(x) \
if (!(p##x = (void*)GetProcAddress(combase, #x))) \
{ \
win_skip("Failed to find %s in combase.dll, skipping tests.\n", #x); \
return; \
}
LOAD_FUNCPTR
(
RoActivateInstance
);
LOAD_FUNCPTR
(
RoGetActivationFactory
);
LOAD_FUNCPTR
(
RoInitialize
);
LOAD_FUNCPTR
(
RoUninitialize
);
LOAD_FUNCPTR
(
WindowsCreateString
);
LOAD_FUNCPTR
(
WindowsDeleteString
);
#undef LOAD_FUNCPTR
test_Gamepad
();
test_RawGameController
();
}
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