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
5b3ccdf0
Commit
5b3ccdf0
authored
Aug 20, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
Aug 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Test for keyboard GetCapabilities.
parent
98d196a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
keyboard.c
dlls/dinput/tests/keyboard.c
+24
-0
No files found.
dlls/dinput/tests/keyboard.c
View file @
5b3ccdf0
...
...
@@ -170,6 +170,29 @@ static void test_get_prop(LPDIRECTINPUT pDI, HWND hwnd)
if
(
pKeyboard
)
IUnknown_Release
(
pKeyboard
);
}
static
void
test_capabilities
(
LPDIRECTINPUT
pDI
,
HWND
hwnd
)
{
HRESULT
hr
;
LPDIRECTINPUTDEVICE
pKeyboard
=
NULL
;
DIDEVCAPS
caps
;
hr
=
IDirectInput_CreateDevice
(
pDI
,
&
GUID_SysKeyboard
,
&
pKeyboard
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirectInput_CreateDevice() failed: %08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
return
;
caps
.
dwSize
=
sizeof
(
caps
);
hr
=
IDirectInputDevice_GetCapabilities
(
pKeyboard
,
&
caps
);
ok
(
SUCCEEDED
(
hr
),
"GetCapabilites failed: 0x%08x
\n
"
,
hr
);
ok
(
caps
.
dwFlags
&
DIDC_ATTACHED
,
"GetCapabilites dwFlags: 0x%08x
\n
"
,
caps
.
dwFlags
);
ok
(
LOWORD
(
LOBYTE
(
caps
.
dwDevType
))
==
DIDEVTYPE_KEYBOARD
,
"GetCapabilities invalid device type for dwDevType: 0x%08x
\n
"
,
caps
.
dwDevType
);
todo_wine
ok
(
LOWORD
(
HIBYTE
(
caps
.
dwDevType
))
!=
DIDEVTYPEKEYBOARD_UNKNOWN
,
"GetCapabilities invalid device subtype for dwDevType: 0x%08x
\n
"
,
caps
.
dwDevType
);
if
(
pKeyboard
)
IUnknown_Release
(
pKeyboard
);
}
static
void
keyboard_tests
(
DWORD
version
)
{
HRESULT
hr
;
...
...
@@ -196,6 +219,7 @@ static void keyboard_tests(DWORD version)
acquire_tests
(
pDI
,
hwnd
);
test_set_coop
(
pDI
,
hwnd
);
test_get_prop
(
pDI
,
hwnd
);
test_capabilities
(
pDI
,
hwnd
);
}
DestroyWindow
(
hwnd
);
...
...
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