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
44303b66
Commit
44303b66
authored
Aug 18, 2016
by
Bruno Jesus
Committed by
Alexandre Julliard
Aug 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Implement DIPROP_PRODUCTNAME in GetProperty.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aab54da6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
joystick.c
dlls/dinput/joystick.c
+4
-0
joystick.c
dlls/dinput/tests/joystick.c
+8
-0
No files found.
dlls/dinput/joystick.c
View file @
44303b66
...
...
@@ -583,6 +583,7 @@ HRESULT WINAPI JoystickWGenericImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, REF
}
break
;
}
case
(
DWORD_PTR
)
DIPROP_PRODUCTNAME
:
case
(
DWORD_PTR
)
DIPROP_INSTANCENAME
:
{
DIPROPSTRING
*
ps
=
(
DIPROPSTRING
*
)
pdiph
;
DIDEVICEINSTANCEW
didev
;
...
...
@@ -590,6 +591,9 @@ HRESULT WINAPI JoystickWGenericImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, REF
didev
.
dwSize
=
sizeof
(
didev
);
IDirectInputDevice_GetDeviceInfo
(
iface
,
&
didev
);
if
(
LOWORD
(
rguid
)
==
(
DWORD_PTR
)
DIPROP_PRODUCTNAME
)
lstrcpynW
(
ps
->
wsz
,
didev
.
tszProductName
,
MAX_PATH
);
else
lstrcpynW
(
ps
->
wsz
,
didev
.
tszInstanceName
,
MAX_PATH
);
return
DI_OK
;
...
...
dlls/dinput/tests/joystick.c
View file @
44303b66
...
...
@@ -253,6 +253,14 @@ static BOOL CALLBACK EnumJoysticks(const DIDEVICEINSTANCEA *lpddi, void *pvRef)
ok
(
!
lstrcmpW
(
nameBuffer
,
dps
.
wsz
),
"DIPROP_INSTANCENAME returned is wrong. Expected: %s Got: %s
\n
"
,
wine_dbgstr_w
(
nameBuffer
),
wine_dbgstr_w
(
dps
.
wsz
));
hr
=
IDirectInputDevice_GetProperty
(
pJoystick
,
DIPROP_PRODUCTNAME
,
&
dps
.
diph
);
ok
(
SUCCEEDED
(
hr
),
"IDirectInput_GetProperty() for DIPROP_PRODUCTNAME failed: %08x
\n
"
,
hr
);
/* Test if product name is the same as present in DIDEVICEINSTANCE */
MultiByteToWideChar
(
CP_ACP
,
0
,
lpddi
->
tszProductName
,
-
1
,
nameBuffer
,
MAX_PATH
);
ok
(
!
lstrcmpW
(
nameBuffer
,
dps
.
wsz
),
"DIPROP_PRODUCTNAME 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
);
...
...
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