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
8b09a8eb
Commit
8b09a8eb
authored
Dec 28, 2008
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Dec 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Fix remaining formatting of the find_joydevs().
parent
a610cfb6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+16
-13
No files found.
dlls/dinput/joystick_linuxinput.c
View file @
8b09a8eb
...
@@ -265,14 +265,17 @@ static void find_joydevs(void)
...
@@ -265,14 +265,17 @@ static void find_joydevs(void)
/* A true joystick has at least axis X and Y, and at least 1
/* A true joystick has at least axis X and Y, and at least 1
* button. copied from linux/drivers/input/joydev.c */
* button. copied from linux/drivers/input/joydev.c */
if
(
test_bit
(
joydev
.
absbits
,
ABS_X
)
&&
test_bit
(
joydev
.
absbits
,
ABS_Y
)
&&
if
(
!
test_bit
(
joydev
.
absbits
,
ABS_X
)
||
!
test_bit
(
joydev
.
absbits
,
ABS_Y
)
||
(
test_bit
(
joydev
.
keybits
,
BTN_TRIGGER
)
||
!
(
test_bit
(
joydev
.
keybits
,
BTN_TRIGGER
)
||
test_bit
(
joydev
.
keybits
,
BTN_A
)
||
test_bit
(
joydev
.
keybits
,
BTN_A
)
||
test_bit
(
joydev
.
keybits
,
BTN_1
)
test_bit
(
joydev
.
keybits
,
BTN_1
)))
)
{
)
{
close
(
fd
);
continue
;
if
(
!
(
joydev
.
device
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
buf
)
+
1
)))
{
}
if
(
!
(
joydev
.
device
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
buf
)
+
1
)))
{
close
(
fd
);
close
(
fd
);
continue
;
continue
;
}
}
...
@@ -305,9 +308,11 @@ static void find_joydevs(void)
...
@@ -305,9 +308,11 @@ static void find_joydevs(void)
}
}
#endif
#endif
for
(
j
=
0
;
j
<
ABS_MAX
;
j
++
)
{
for
(
j
=
0
;
j
<
ABS_MAX
;
j
++
)
if
(
test_bit
(
joydev
.
absbits
,
j
))
{
{
if
(
-
1
!=
ioctl
(
fd
,
EVIOCGABS
(
j
),
&
(
joydev
.
axes
[
j
])))
{
if
(
!
test_bit
(
joydev
.
absbits
,
j
))
continue
;
if
(
ioctl
(
fd
,
EVIOCGABS
(
j
),
&
(
joydev
.
axes
[
j
]))
!=
-
1
)
{
TRACE
(
" ... with axis %d: cur=%d, min=%d, max=%d, fuzz=%d, flat=%d
\n
"
,
TRACE
(
" ... with axis %d: cur=%d, min=%d, max=%d, fuzz=%d, flat=%d
\n
"
,
j
,
j
,
joydev
.
axes
[
j
].
value
,
joydev
.
axes
[
j
].
value
,
...
@@ -318,7 +323,6 @@ static void find_joydevs(void)
...
@@ -318,7 +323,6 @@ static void find_joydevs(void)
);
);
}
}
}
}
}
if
(
!
have_joydevs
)
if
(
!
have_joydevs
)
new_joydevs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
JoyDev
));
new_joydevs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
JoyDev
));
...
@@ -333,7 +337,6 @@ static void find_joydevs(void)
...
@@ -333,7 +337,6 @@ static void find_joydevs(void)
joydevs
=
new_joydevs
;
joydevs
=
new_joydevs
;
memcpy
(
joydevs
+
have_joydevs
,
&
joydev
,
sizeof
(
joydev
));
memcpy
(
joydevs
+
have_joydevs
,
&
joydev
,
sizeof
(
joydev
));
have_joydevs
++
;
have_joydevs
++
;
}
close
(
fd
);
close
(
fd
);
}
}
...
...
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