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
6b44c4f5
Commit
6b44c4f5
authored
Aug 20, 2016
by
Bruno Jesus
Committed by
Alexandre Julliard
Aug 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Get the controller type from the device instance for Linux drivers.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4cc193bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
joystick_linux.c
dlls/dinput/joystick_linux.c
+6
-4
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+5
-4
No files found.
dlls/dinput/joystick_linux.c
View file @
6b44c4f5
...
...
@@ -406,6 +406,7 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput,
HRESULT
hr
;
LPDIDATAFORMAT
df
=
NULL
;
int
idx
=
0
;
DIDEVICEINSTANCEW
ddi
;
TRACE
(
"%s %p %p %hu
\n
"
,
debugstr_guid
(
rguid
),
dinput
,
pdev
,
index
);
...
...
@@ -496,10 +497,11 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput,
newDevice
->
generic
.
devcaps
.
dwSize
=
sizeof
(
newDevice
->
generic
.
devcaps
);
newDevice
->
generic
.
devcaps
.
dwFlags
=
DIDC_ATTACHED
;
if
(
newDevice
->
generic
.
base
.
dinput
->
dwVersion
>=
0x0800
)
newDevice
->
generic
.
devcaps
.
dwDevType
=
DI8DEVTYPE_JOYSTICK
|
(
DI8DEVTYPEJOYSTICK_STANDARD
<<
8
);
else
newDevice
->
generic
.
devcaps
.
dwDevType
=
DIDEVTYPE_JOYSTICK
|
(
DIDEVTYPEJOYSTICK_TRADITIONAL
<<
8
);
ddi
.
dwSize
=
sizeof
(
ddi
);
fill_joystick_dideviceinstanceW
(
&
ddi
,
newDevice
->
generic
.
base
.
dinput
->
dwVersion
,
index
);
newDevice
->
generic
.
devcaps
.
dwDevType
=
ddi
.
dwDevType
;
newDevice
->
generic
.
devcaps
.
dwFFSamplePeriod
=
0
;
newDevice
->
generic
.
devcaps
.
dwFFMinTimeResolution
=
0
;
newDevice
->
generic
.
devcaps
.
dwFirmwareRevision
=
0
;
...
...
dlls/dinput/joystick_linuxinput.c
View file @
6b44c4f5
...
...
@@ -452,6 +452,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig
LPDIDATAFORMAT
df
=
NULL
;
int
i
,
idx
=
0
;
int
default_axis_map
[
WINE_JOYSTICK_MAX_AXES
+
WINE_JOYSTICK_MAX_POVS
*
2
];
DIDEVICEINSTANCEW
ddi
;
newDevice
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
JoystickImpl
));
if
(
!
newDevice
)
return
NULL
;
...
...
@@ -571,10 +572,10 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig
/* Fill the caps */
newDevice
->
generic
.
devcaps
.
dwSize
=
sizeof
(
newDevice
->
generic
.
devcaps
);
newDevice
->
generic
.
devcaps
.
dwFlags
=
DIDC_ATTACHED
;
if
(
newDevice
->
generic
.
base
.
dinput
->
dwVersion
>=
0x0800
)
newDevice
->
generic
.
devcaps
.
dwDevType
=
DI8DEVTYPE_JOYSTICK
|
(
DI8DEVTYPEJOYSTICK_STANDARD
<<
8
);
else
newDevice
->
generic
.
devcaps
.
dwDevType
=
DIDEVTYPE_JOYSTICK
|
(
DIDEVTYPEJOYSTICK_TRADITIONAL
<<
8
)
;
ddi
.
dwSize
=
sizeof
(
ddi
);
fill_joystick_dideviceinstanceW
(
&
ddi
,
newDevice
->
generic
.
base
.
dinput
->
dwVersion
,
index
);
newDevice
->
generic
.
devcaps
.
dwDevType
=
ddi
.
dwDevType
;
if
(
newDevice
->
joydev
->
has_ff
)
newDevice
->
generic
.
devcaps
.
dwFlags
|=
DIDC_FORCEFEEDBACK
;
...
...
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