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
913cbb9f
Commit
913cbb9f
authored
Oct 11, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
Oct 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Test for DIPROP_INSTANCENAME and DIPROP_GUIDANDPATH.
parent
59c144f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
joystick.c
dlls/dinput/tests/joystick.c
+26
-0
dinput.h
include/dinput.h
+2
-0
No files found.
dlls/dinput/tests/joystick.c
View file @
913cbb9f
...
...
@@ -181,6 +181,9 @@ static BOOL CALLBACK EnumJoysticks(
DIDEVICEINSTANCE
inst
;
DIDEVICEINSTANCE_DX3
inst3
;
DIPROPDWORD
dipw
;
DIPROPSTRING
dps
;
DIPROPGUIDANDPATH
dpg
;
WCHAR
nameBuffer
[
MAX_PATH
];
HWND
hWnd
=
get_hwnd
();
char
oldstate
[
248
],
curstate
[
248
];
...
...
@@ -216,6 +219,29 @@ static BOOL CALLBACK EnumJoysticks(
hr
=
IDirectInputDevice_GetProperty
(
pJoystick
,
DIPROP_JOYSTICKID
,
&
dipw
.
diph
);
ok
(
SUCCEEDED
(
hr
),
"IDirectInputDevice_GetProperty() for DIPROP_JOYSTICKID failed
\n
"
);
/* Test for INSTANCENAME property */
memset
(
&
dps
,
0
,
sizeof
(
dps
));
dps
.
diph
.
dwSize
=
sizeof
(
DIPROPSTRING
);
dps
.
diph
.
dwHeaderSize
=
sizeof
(
DIPROPHEADER
);
dps
.
diph
.
dwHow
=
DIPH_DEVICE
;
hr
=
IDirectInputDevice_GetProperty
(
pJoystick
,
DIPROP_INSTANCENAME
,
&
dps
.
diph
);
ok
(
SUCCEEDED
(
hr
),
"IDirectInput_GetProperty() for DIPROP_INSTANCENAME failed: %08x
\n
"
,
hr
);
/* Test if instance name is the same as present in DIDEVICEINSTANCE */
MultiByteToWideChar
(
CP_ACP
,
0
,
lpddi
->
tszInstanceName
,
-
1
,
nameBuffer
,
MAX_PATH
);
ok
(
!
lstrcmpW
(
nameBuffer
,
dps
.
wsz
),
"DIPROP_INSTANCENAME returned is wrong. Expected: %s Got: %s
\n
"
,
wine_dbgstr_w
(
nameBuffer
),
wine_dbgstr_w
(
dps
.
wsz
));
/* Test for GUIDPATH properties */
memset
(
&
dpg
,
0
,
sizeof
(
dpg
));
dpg
.
diph
.
dwSize
=
sizeof
(
DIPROPGUIDANDPATH
);
dpg
.
diph
.
dwHeaderSize
=
sizeof
(
DIPROPHEADER
);
dpg
.
diph
.
dwHow
=
DIPH_DEVICE
;
hr
=
IDirectInputDevice_GetProperty
(
pJoystick
,
DIPROP_GUIDANDPATH
,
&
dpg
.
diph
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"IDirectInput_GetProperty() for DIPROP_GUIDANDPATH failed: %08x
\n
"
,
hr
);
hr
=
IDirectInputDevice_SetDataFormat
(
pJoystick
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IDirectInputDevice_SetDataFormat() should have returned "
"E_POINTER, returned: %08x
\n
"
,
hr
);
...
...
include/dinput.h
View file @
913cbb9f
...
...
@@ -905,6 +905,8 @@ typedef const DIPROPSTRING *LPCDIPROPSTRING;
#define DIPROP_CALIBRATION MAKEDIPROP(11)
#define DIPROP_GUIDANDPATH MAKEDIPROP(12)
#define DIPROP_INSTANCENAME MAKEDIPROP(13)
#define DIPROP_JOYSTICKID MAKEDIPROP(15)
#define DIPROP_KEYNAME MAKEDIPROP(20)
#define DIPROP_VIDPID MAKEDIPROP(24)
...
...
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