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
dbc10ef9
Commit
dbc10ef9
authored
Aug 13, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
Aug 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Tests for IDirectInputJoyConfig8_GetConfig.
parent
fc944144
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
dinput.c
dlls/dinput/tests/dinput.c
+44
-0
dinputd.h
include/dinputd.h
+2
-0
No files found.
dlls/dinput/tests/dinput.c
View file @
dbc10ef9
...
...
@@ -22,6 +22,7 @@
#include <initguid.h>
#include <windows.h>
#include <dinput.h>
#include <dinputd.h>
#include "wine/test.h"
...
...
@@ -562,6 +563,48 @@ static void test_RunControlPanel(void)
IDirectInput_Release
(
pDI
);
}
static
void
test_DirectInputJoyConfig8
(
void
)
{
IDirectInputA
*
pDI
;
IDirectInputDeviceA
*
pDID
;
IDirectInputJoyConfig8
*
pDIJC
;
DIJOYCONFIG
info
;
HRESULT
hr
;
int
i
;
hr
=
DirectInputCreateA
(
hInstance
,
DIRECTINPUT_VERSION
,
&
pDI
,
NULL
);
if
(
FAILED
(
hr
))
{
win_skip
(
"Failed to instantiate a IDirectInputA instance: 0x%08x
\n
"
,
hr
);
return
;
}
hr
=
IDirectInput_QueryInterface
(
pDI
,
&
IID_IDirectInputJoyConfig8
,
(
void
**
)
&
pDIJC
);
if
(
FAILED
(
hr
))
{
win_skip
(
"Failed to instantiate a IDirectInputJoyConfig8 instance: 0x%08x
\n
"
,
hr
);
return
;
}
info
.
dwSize
=
sizeof
(
info
);
hr
=
DI_OK
;
i
=
0
;
/* Enumerate all connected joystick GUIDs and try to create the respective devices */
for
(
i
=
0
;
SUCCEEDED
(
hr
);
i
++
)
{
hr
=
IDirectInputJoyConfig8_GetConfig
(
pDIJC
,
i
,
&
info
,
DIJC_GUIDINSTANCE
);
todo_wine
ok
(
hr
==
DI_OK
||
hr
==
DIERR_NOMOREITEMS
,
"IDirectInputJoyConfig8_GetConfig returned 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
todo_wine
ok
(
SUCCEEDED
(
IDirectInput_CreateDevice
(
pDI
,
&
info
.
guidInstance
,
&
pDID
,
NULL
)),
"IDirectInput_CreateDevice failed with guid from GetConfig hr = 0x%08x
\n
"
,
hr
);
}
}
START_TEST
(
dinput
)
{
HMODULE
dinput_mod
=
GetModuleHandleA
(
"dinput.dll"
);
...
...
@@ -579,5 +622,6 @@ START_TEST(dinput)
test_GetDeviceStatus
();
test_Initialize
();
test_RunControlPanel
();
test_DirectInputJoyConfig8
();
CoUninitialize
();
}
include/dinputd.h
View file @
dbc10ef9
...
...
@@ -44,6 +44,8 @@ typedef BOOL (CALLBACK *LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID);
#define JOY_POVVAL_LEFT 2
#define JOY_POVVAL_RIGHT 3
#define DIERR_NOMOREITEMS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NO_MORE_ITEMS)
typedef
struct
joypos_tag
{
DWORD
dwX
;
...
...
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