Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
47ab1759
Commit
47ab1759
authored
Mar 22, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Mar 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/tests: Add a basic joystick interactive test.
parent
f70ddf76
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
joystick.c
dlls/winmm/tests/joystick.c
+29
-0
No files found.
dlls/winmm/tests/joystick.c
View file @
47ab1759
...
...
@@ -195,6 +195,35 @@ static void test_api(void)
ret
=
joyGetPosEx
(
joyid
,
&
infoex
.
ex
);
ok
(
ret
==
JOYERR_NOERROR
,
"Expected %d, got %d
\n
"
,
JOYERR_NOERROR
,
ret
);
}
/* the interactive tests spans for 15 seconds, a 500ms polling is used to get
* changes in the joystick. */
if
(
winetest_interactive
)
{
#define MAX_TIME 15000
DWORD
tick
=
GetTickCount
(),
spent
;
infoex
.
ex
.
dwSize
=
sizeof
(
infoex
.
ex
);
infoex
.
ex
.
dwFlags
=
JOY_RETURNALL
;
do
{
spent
=
GetTickCount
()
-
tick
;
ret
=
joyGetPosEx
(
joyid
,
&
infoex
.
ex
);
if
(
ret
==
JOYERR_NOERROR
)
{
trace
(
"X: %5d, Y: %5d, Z: %5d, POV: %5d
\n
"
,
infoex
.
ex
.
dwXpos
,
infoex
.
ex
.
dwYpos
,
infoex
.
ex
.
dwZpos
,
infoex
.
ex
.
dwPOV
);
trace
(
"R: %5d, U: %5d, V: %5d
\n
"
,
infoex
.
ex
.
dwRpos
,
infoex
.
ex
.
dwUpos
,
infoex
.
ex
.
dwVpos
);
trace
(
"BUTTONS: 0x%04X, BUTTON_COUNT: %2d, REMAINING: %d ms
\n\n
"
,
infoex
.
ex
.
dwButtons
,
infoex
.
ex
.
dwButtonNumber
,
MAX_TIME
-
spent
);
}
Sleep
(
500
);
}
while
(
spent
<
MAX_TIME
);
#undef MAX_TIME
}
else
skip
(
"Skipping interactive tests for the joystick
\n
"
);
}
START_TEST
(
joystick
)
...
...
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