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
caaedf1c
Commit
caaedf1c
authored
Sep 08, 2016
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winejoystick.drv: Test for new joysticks in intervals of 2 seconds.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4f114ad6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
joystick_linux.c
dlls/winejoystick.drv/joystick_linux.c
+8
-0
No files found.
dlls/winejoystick.drv/joystick_linux.c
View file @
caaedf1c
...
...
@@ -163,10 +163,17 @@ static int JSTCK_OpenDevice(WINE_JSTCK* jstick)
{
char
buf
[
20
];
int
flags
,
fd
,
found_ix
,
i
;
static
DWORD
last_attempt
;
DWORD
now
;
if
(
jstick
->
dev
>
0
)
return
jstick
->
dev
;
now
=
GetTickCount
();
if
(
now
-
last_attempt
<
2000
)
return
-
1
;
last_attempt
=
now
;
#ifdef HAVE_LINUX_22_JOYSTICK_API
flags
=
O_RDONLY
|
O_NONBLOCK
;
#else
...
...
@@ -189,6 +196,7 @@ static int JSTCK_OpenDevice(WINE_JSTCK* jstick)
{
TRACE
(
"Found joystick[%d] at %s
\n
"
,
jstick
->
joyIntf
,
buf
);
jstick
->
dev
=
fd
;
last_attempt
=
0
;
break
;
}
...
...
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