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
30ae7354
Commit
30ae7354
authored
Aug 17, 2016
by
Bruno Jesus
Committed by
Alexandre Julliard
Aug 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Properly fill the HID information for the controller in the event driver.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dd7b6573
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+14
-1
No files found.
dlls/dinput/joystick_linuxinput.c
View file @
30ae7354
...
...
@@ -110,7 +110,7 @@ struct JoyDev {
/* data returned by the EVIOCGABS() ioctl */
struct
wine_input_absinfo
axes
[
ABS_MAX
];
WORD
vendor_id
,
product_id
;
WORD
vendor_id
,
product_id
,
bus_type
;
};
struct
JoystickImpl
...
...
@@ -315,6 +315,7 @@ static void find_joydevs(void)
{
joydev
.
vendor_id
=
device_id
.
vendor
;
joydev
.
product_id
=
device_id
.
product
;
joydev
.
bus_type
=
device_id
.
bustype
;
/* Concatenate product_id with vendor_id to mimic Windows behaviour */
joydev
.
guid_product
=
DInput_Wine_Joystick_Constant_Part_GUID
;
...
...
@@ -356,6 +357,18 @@ static void fill_joystick_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD ver
else
lpddi
->
dwDevType
=
DIDEVTYPE_JOYSTICK
|
(
DIDEVTYPEJOYSTICK_TRADITIONAL
<<
8
);
/* Assume the joystick as HID if it is attached to USB bus and has a valid VID/PID */
if
(
joydevs
[
id
].
bus_type
==
BUS_USB
&&
joydevs
[
id
].
vendor_id
&&
joydevs
[
id
].
product_id
)
{
lpddi
->
dwDevType
|=
DIDEVTYPE_HID
;
lpddi
->
wUsagePage
=
0x01
;
/* Desktop */
if
(
lpddi
->
dwDevType
==
DI8DEVTYPE_JOYSTICK
||
lpddi
->
dwDevType
==
DIDEVTYPE_JOYSTICK
)
lpddi
->
wUsage
=
0x04
;
/* Joystick */
else
lpddi
->
wUsage
=
0x05
;
/* Game Pad */
}
MultiByteToWideChar
(
CP_ACP
,
0
,
joydevs
[
id
].
name
,
-
1
,
lpddi
->
tszInstanceName
,
MAX_PATH
);
MultiByteToWideChar
(
CP_ACP
,
0
,
joydevs
[
id
].
name
,
-
1
,
lpddi
->
tszProductName
,
MAX_PATH
);
}
...
...
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