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
fbfdc6db
Commit
fbfdc6db
authored
May 29, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
May 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Implement GetProperty for JOYSTICKID (Linux driver).
parent
29cac72d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
joystick_linux.c
dlls/dinput/joystick_linux.c
+38
-2
dinput.h
include/dinput.h
+1
-0
No files found.
dlls/dinput/joystick_linux.c
View file @
fbfdc6db
...
...
@@ -542,6 +542,42 @@ static HRESULT WINAPI JoystickLinuxAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
}
/******************************************************************************
* GetProperty : get input device properties
*/
static
HRESULT
WINAPI
JoystickLinuxWImpl_GetProperty
(
LPDIRECTINPUTDEVICE8W
iface
,
REFGUID
rguid
,
LPDIPROPHEADER
pdiph
)
{
JoystickImpl
*
This
=
impl_from_IDirectInputDevice8W
(
iface
);
TRACE
(
"(this=%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
rguid
),
pdiph
);
_dump_DIPROPHEADER
(
pdiph
);
if
(
!
IS_DIPROP
(
rguid
))
return
DI_OK
;
switch
(
LOWORD
(
rguid
))
{
case
(
DWORD_PTR
)
DIPROP_JOYSTICKID
:
{
LPDIPROPDWORD
pd
=
(
LPDIPROPDWORD
)
pdiph
;
pd
->
dwData
=
get_joystick_index
(
&
This
->
generic
.
base
.
guid
);
TRACE
(
"DIPROP_JOYSTICKID(%d)
\n
"
,
pd
->
dwData
);
break
;
}
default:
return
JoystickWGenericImpl_GetProperty
(
iface
,
rguid
,
pdiph
);
}
return
DI_OK
;
}
static
HRESULT
WINAPI
JoystickLinuxAImpl_GetProperty
(
LPDIRECTINPUTDEVICE8A
iface
,
REFGUID
rguid
,
LPDIPROPHEADER
pdiph
)
{
JoystickImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
return
JoystickLinuxWImpl_GetProperty
(
IDirectInputDevice8W_from_impl
(
This
),
rguid
,
pdiph
);
}
/******************************************************************************
* Unacquire : frees the joystick
*/
static
HRESULT
WINAPI
JoystickLinuxWImpl_Unacquire
(
LPDIRECTINPUTDEVICE8W
iface
)
...
...
@@ -655,7 +691,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
IDirectInputDevice2AImpl_Release
,
JoystickAGenericImpl_GetCapabilities
,
IDirectInputDevice2AImpl_EnumObjects
,
Joystick
AGeneric
Impl_GetProperty
,
Joystick
LinuxA
Impl_GetProperty
,
JoystickAGenericImpl_SetProperty
,
JoystickLinuxAImpl_Acquire
,
JoystickLinuxAImpl_Unacquire
,
...
...
@@ -691,7 +727,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt =
IDirectInputDevice2WImpl_Release
,
JoystickWGenericImpl_GetCapabilities
,
IDirectInputDevice2WImpl_EnumObjects
,
Joystick
WGeneric
Impl_GetProperty
,
Joystick
LinuxW
Impl_GetProperty
,
JoystickWGenericImpl_SetProperty
,
JoystickLinuxWImpl_Acquire
,
JoystickLinuxWImpl_Unacquire
,
...
...
include/dinput.h
View file @
fbfdc6db
...
...
@@ -905,6 +905,7 @@ typedef const DIPROPSTRING *LPCDIPROPSTRING;
#define DIPROP_CALIBRATION MAKEDIPROP(11)
#define DIPROP_GUIDANDPATH MAKEDIPROP(12)
#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