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
937dcde3
Commit
937dcde3
authored
Aug 17, 2018
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Aug 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Add more tests for keyboard subtypes.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
75a2893f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
keyboard.c
dlls/dinput/tests/keyboard.c
+16
-2
No files found.
dlls/dinput/tests/keyboard.c
View file @
937dcde3
...
...
@@ -263,6 +263,7 @@ static void test_capabilities(IDirectInputA *pDI, HWND hwnd)
HRESULT
hr
;
IDirectInputDeviceA
*
pKeyboard
=
NULL
;
DIDEVCAPS
caps
;
int
kbd_type
,
kbd_subtype
,
dev_subtype
;
hr
=
IDirectInput_CreateDevice
(
pDI
,
&
GUID_SysKeyboard
,
&
pKeyboard
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirectInput_CreateDevice() failed: %08x
\n
"
,
hr
);
...
...
@@ -275,8 +276,21 @@ static void test_capabilities(IDirectInputA *pDI, HWND hwnd)
ok
(
caps
.
dwFlags
&
DIDC_ATTACHED
,
"GetCapabilities dwFlags: 0x%08x
\n
"
,
caps
.
dwFlags
);
ok
(
GET_DIDEVICE_TYPE
(
caps
.
dwDevType
)
==
DIDEVTYPE_KEYBOARD
,
"GetCapabilities invalid device type for dwDevType: 0x%08x
\n
"
,
caps
.
dwDevType
);
ok
(
GET_DIDEVICE_SUBTYPE
(
caps
.
dwDevType
)
!=
DIDEVTYPEKEYBOARD_UNKNOWN
,
"GetCapabilities invalid device subtype for dwDevType: 0x%08x
\n
"
,
caps
.
dwDevType
);
kbd_type
=
GetKeyboardType
(
0
);
kbd_subtype
=
GetKeyboardType
(
1
);
dev_subtype
=
GET_DIDEVICE_SUBTYPE
(
caps
.
dwDevType
);
if
(
kbd_type
==
4
||
(
kbd_type
==
7
&&
kbd_subtype
==
0
))
ok
(
dev_subtype
==
DIDEVTYPEKEYBOARD_PCENH
,
"GetCapabilities invalid device subtype for dwDevType: 0x%08x (%04x:%04x)
\n
"
,
caps
.
dwDevType
,
kbd_type
,
kbd_subtype
);
else
if
(
kbd_type
==
7
&&
kbd_subtype
==
2
)
todo_wine
ok
(
dev_subtype
==
DIDEVTYPEKEYBOARD_JAPAN106
,
"GetCapabilities invalid device subtype for dwDevType: 0x%08x (%04x:%04x)
\n
"
,
caps
.
dwDevType
,
kbd_type
,
kbd_subtype
);
else
ok
(
dev_subtype
!=
DIDEVTYPEKEYBOARD_UNKNOWN
,
"GetCapabilities invalid device subtype for dwDevType: 0x%08x (%04x:%04x)
\n
"
,
caps
.
dwDevType
,
kbd_type
,
kbd_subtype
);
IUnknown_Release
(
pKeyboard
);
}
...
...
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