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
8bfb1256
Commit
8bfb1256
authored
Aug 24, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
Aug 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Append driver name to dinput joysticks on Linux.
parent
79ba36ae
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
joystick_linux.c
dlls/dinput/joystick_linux.c
+6
-1
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+6
-1
No files found.
dlls/dinput/joystick_linux.c
View file @
8bfb1256
...
...
@@ -71,6 +71,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput);
#define JOYDEV_NEW "/dev/input/js"
#define JOYDEV_OLD "/dev/js"
#define JOYDEVDRIVER " (js)"
struct
JoyDev
{
...
...
@@ -150,9 +151,13 @@ static INT find_joystick_devices(void)
strcpy
(
joydev
.
name
,
"Wine Joystick"
);
#if defined(JSIOCGNAME)
if
(
ioctl
(
fd
,
JSIOCGNAME
(
sizeof
(
joydev
.
name
)),
joydev
.
name
)
<
0
)
if
(
ioctl
(
fd
,
JSIOCGNAME
(
sizeof
(
joydev
.
name
)
-
sizeof
(
JOYDEVDRIVER
)
),
joydev
.
name
)
<
0
)
WARN
(
"ioctl(%s,JSIOCGNAME) failed: %s
\n
"
,
joydev
.
device
,
strerror
(
errno
));
#endif
/* Append driver name */
strcat
(
joydev
.
name
,
JOYDEVDRIVER
);
#ifdef JSIOCGAXES
if
(
ioctl
(
fd
,
JSIOCGAXES
,
&
joydev
.
axis_count
)
<
0
)
{
...
...
dlls/dinput/joystick_linuxinput.c
View file @
8bfb1256
...
...
@@ -68,6 +68,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput);
#ifdef HAVE_CORRECT_LINUXINPUT_H
#define EVDEVPREFIX "/dev/input/event"
#define EVDEVDRIVER " (event)"
/* Wine joystick driver object instances */
#define WINE_JOYSTICK_MAX_AXES 8
...
...
@@ -241,8 +242,12 @@ static void find_joydevs(void)
buf
[
MAX_PATH
-
1
]
=
0
;
if
(
ioctl
(
fd
,
EVIOCGNAME
(
MAX_PATH
-
1
),
buf
)
!=
-
1
&&
(
joydev
.
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
buf
)
+
1
)))
(
joydev
.
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
buf
)
+
strlen
(
EVDEVDRIVER
)
+
1
)))
{
strcpy
(
joydev
.
name
,
buf
);
/* Append driver name */
strcat
(
joydev
.
name
,
EVDEVDRIVER
);
}
else
joydev
.
name
=
joydev
.
device
;
...
...
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