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
ef7432d8
Commit
ef7432d8
authored
Aug 27, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Implement HID joystick IDirectInputDevice8_GetObjectInfo.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2681caa3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
joystick_hid.c
dlls/dinput/joystick_hid.c
+38
-1
No files found.
dlls/dinput/joystick_hid.c
View file @
ef7432d8
...
...
@@ -536,6 +536,43 @@ static HRESULT WINAPI hid_joystick_GetDeviceState( IDirectInputDevice8W *iface,
return
DI_OK
;
}
static
BOOL
get_object_info
(
struct
hid_joystick
*
impl
,
struct
hid_caps
*
caps
,
DIDEVICEOBJECTINSTANCEW
*
instance
,
void
*
data
)
{
DIDEVICEOBJECTINSTANCEW
*
dest
=
data
;
memcpy
(
dest
,
instance
,
dest
->
dwSize
);
return
DIENUM_STOP
;
}
static
HRESULT
WINAPI
hid_joystick_GetObjectInfo
(
IDirectInputDevice8W
*
iface
,
DIDEVICEOBJECTINSTANCEW
*
instance
,
DWORD
obj
,
DWORD
how
)
{
struct
hid_joystick
*
impl
=
impl_from_IDirectInputDevice8W
(
iface
);
const
DIPROPHEADER
filter
=
{
.
dwSize
=
sizeof
(
filter
),
.
dwHeaderSize
=
sizeof
(
filter
),
.
dwHow
=
how
,
.
dwObj
=
obj
};
BOOL
ret
;
TRACE
(
"iface %p, instance %p, obj %#x, how %#x.
\n
"
,
iface
,
instance
,
obj
,
how
);
if
(
!
instance
)
return
E_POINTER
;
if
(
instance
->
dwSize
!=
sizeof
(
DIDEVICEOBJECTINSTANCE_DX3W
)
&&
instance
->
dwSize
!=
sizeof
(
DIDEVICEOBJECTINSTANCEW
))
return
DIERR_INVALIDPARAM
;
ret
=
enum_value_objects
(
impl
,
&
filter
,
DIDFT_ALL
,
get_object_info
,
NULL
);
if
(
ret
!=
DIENUM_CONTINUE
)
return
S_OK
;
ret
=
enum_button_objects
(
impl
,
&
filter
,
DIDFT_ALL
,
get_object_info
,
NULL
);
if
(
ret
!=
DIENUM_CONTINUE
)
return
S_OK
;
enum_collections_objects
(
impl
,
&
filter
,
DIDFT_ALL
,
get_object_info
,
NULL
);
return
S_OK
;
}
static
HRESULT
WINAPI
hid_joystick_GetDeviceInfo
(
IDirectInputDevice8W
*
iface
,
DIDEVICEINSTANCEW
*
instance
)
{
struct
hid_joystick
*
impl
=
impl_from_IDirectInputDevice8W
(
iface
);
...
...
@@ -592,7 +629,7 @@ static const IDirectInputDevice8WVtbl hid_joystick_vtbl =
IDirectInputDevice2WImpl_SetDataFormat
,
IDirectInputDevice2WImpl_SetEventNotification
,
IDirectInputDevice2WImpl_SetCooperativeLevel
,
IDirectInputDevice2WImpl
_GetObjectInfo
,
hid_joystick
_GetObjectInfo
,
hid_joystick_GetDeviceInfo
,
IDirectInputDevice2WImpl_RunControlPanel
,
IDirectInputDevice2WImpl_Initialize
,
...
...
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