Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
20aa3410
Commit
20aa3410
authored
Apr 14, 2011
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Apr 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Implement getting DIPROP_VIDPID property for evdev joystick driver. Fixes bug 26418.
parent
eee070f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+22
-0
No files found.
dlls/dinput/joystick_linuxinput.c
View file @
20aa3410
...
...
@@ -110,6 +110,8 @@ struct JoyDev {
/* data returned by the EVIOCGABS() ioctl */
struct
wine_input_absinfo
axes
[
ABS_MAX
];
WORD
vendor_id
,
product_id
;
};
struct
JoystickImpl
...
...
@@ -187,6 +189,7 @@ static void find_joydevs(void)
int
no_ff_check
=
0
;
int
j
;
struct
JoyDev
*
new_joydevs
;
struct
input_id
device_id
=
{
0
};
snprintf
(
buf
,
sizeof
(
buf
),
EVDEVPREFIX
"%d"
,
i
);
...
...
@@ -282,6 +285,14 @@ static void find_joydevs(void)
}
}
if
(
ioctl
(
fd
,
EVIOCGID
,
&
device_id
)
==
-
1
)
WARN
(
"ioct(EVIOCGBIT, EV_ABS) failed: %d %s
\n
"
,
errno
,
strerror
(
errno
));
else
{
joydev
.
vendor_id
=
device_id
.
vendor
;
joydev
.
product_id
=
device_id
.
product
;
}
if
(
!
have_joydevs
)
new_joydevs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
JoyDev
));
else
...
...
@@ -946,6 +957,17 @@ static HRESULT WINAPI JoystickWImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, REF
break
;
}
case
(
DWORD_PTR
)
DIPROP_VIDPID
:
{
LPDIPROPDWORD
pd
=
(
LPDIPROPDWORD
)
pdiph
;
if
(
!
This
->
joydev
->
product_id
||
!
This
->
joydev
->
vendor_id
)
return
DIERR_UNSUPPORTED
;
pd
->
dwData
=
MAKELONG
(
This
->
joydev
->
vendor_id
,
This
->
joydev
->
product_id
);
TRACE
(
"DIPROP_VIDPID(%08x)
\n
"
,
pd
->
dwData
);
break
;
}
default:
return
JoystickWGenericImpl_GetProperty
(
iface
,
rguid
,
pdiph
);
}
...
...
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