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
b56953f4
Commit
b56953f4
authored
Nov 06, 2006
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Nov 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Changed select to poll.
parent
0082973d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
joystick_linux.c
dlls/dinput/joystick_linux.c
+7
-5
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+7
-6
No files found.
dlls/dinput/joystick_linux.c
View file @
b56953f4
...
...
@@ -53,6 +53,9 @@
#ifdef HAVE_LINUX_JOYSTICK_H
# include <linux/joystick.h>
#endif
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -897,8 +900,7 @@ static LONG calculate_pov(JoystickImpl *This, int index)
}
static
void
joy_polldev
(
JoystickImpl
*
This
)
{
struct
timeval
tv
;
fd_set
readfds
;
struct
pollfd
plfd
;
struct
js_event
jse
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -907,9 +909,9 @@ static void joy_polldev(JoystickImpl *This) {
return
;
}
while
(
1
)
{
memset
(
&
tv
,
0
,
sizeof
(
tv
))
;
FD_ZERO
(
&
readfds
);
FD_SET
(
This
->
joyfd
,
&
readfds
)
;
if
(
1
>
select
(
This
->
joyfd
+
1
,
&
readfds
,
NULL
,
NULL
,
&
tv
)
)
plfd
.
fd
=
This
->
joyfd
;
plfd
.
events
=
POLLIN
;
if
(
poll
(
&
plfd
,
1
,
0
)
!=
1
)
return
;
/* we have one event, so we can read */
if
(
sizeof
(
jse
)
!=
read
(
This
->
joyfd
,
&
jse
,
sizeof
(
jse
)))
{
...
...
dlls/dinput/joystick_linuxinput.c
View file @
b56953f4
...
...
@@ -48,6 +48,9 @@
# define HAVE_CORRECT_LINUXINPUT_H
# endif
#endif
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -860,8 +863,7 @@ static void calculate_ids(LPDIDATAFORMAT df)
}
static
void
joy_polldev
(
JoystickImpl
*
This
)
{
struct
timeval
tv
;
fd_set
readfds
;
struct
pollfd
plfd
;
struct
input_event
ie
;
int
btn
,
offset
;
...
...
@@ -869,11 +871,10 @@ static void joy_polldev(JoystickImpl *This) {
return
;
while
(
1
)
{
memset
(
&
tv
,
0
,
sizeof
(
tv
));
FD_ZERO
(
&
readfds
);
FD_SET
(
This
->
joyfd
,
&
readfds
);
plfd
.
fd
=
This
->
joyfd
;
plfd
.
events
=
POLLIN
;
if
(
1
>
select
(
This
->
joyfd
+
1
,
&
readfds
,
NULL
,
NULL
,
&
tv
)
)
if
(
poll
(
&
plfd
,
1
,
0
)
!=
1
)
return
;
/* we have one event, so we can read */
...
...
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