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
69dda4cd
Commit
69dda4cd
authored
Jun 07, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
Jun 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
joy.cpl: Added trace messages to show joystick input.
parent
af55e7dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
main.c
dlls/joy.cpl/main.c
+16
-0
No files found.
dlls/joy.cpl/main.c
View file @
69dda4cd
...
...
@@ -174,6 +174,20 @@ INT_PTR CALLBACK list_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
* Joystick testing functions
*
*/
static
void
dump_joy_state
(
DIJOYSTATE
*
st
,
int
num_buttons
)
{
int
i
;
TRACE
(
"Ax (% 5d,% 5d,% 5d)
\n
"
,
st
->
lX
,
st
->
lY
,
st
->
lZ
);
TRACE
(
"RAx (% 5d,% 5d,% 5d)
\n
"
,
st
->
lRx
,
st
->
lRy
,
st
->
lRz
);
TRACE
(
"Slider (% 5d,% 5d)
\n
"
,
st
->
rglSlider
[
0
],
st
->
rglSlider
[
1
]);
TRACE
(
"Pov (% 5d,% 5d,% 5d,% 5d)
\n
"
,
st
->
rgdwPOV
[
0
],
st
->
rgdwPOV
[
1
],
st
->
rgdwPOV
[
2
],
st
->
rgdwPOV
[
3
]);
TRACE
(
"Buttons "
);
for
(
i
=
0
;
i
<
num_buttons
;
i
++
)
TRACE
(
" %c"
,
st
->
rgbButtons
[
i
]
?
'x'
:
'o'
);
TRACE
(
"
\n
"
);
}
static
void
poll_input
(
const
struct
Joystick
*
joy
,
DIJOYSTATE
*
state
)
{
HRESULT
hr
;
...
...
@@ -205,6 +219,8 @@ static DWORD WINAPI input_thread(void *param)
int
i
;
poll_input
(
&
data
->
joysticks
[
data
->
chosen_joystick
],
&
state
);
dump_joy_state
(
&
state
,
data
->
joysticks
[
data
->
chosen_joystick
].
num_buttons
);
/* Indicate pressed buttons */
for
(
i
=
0
;
i
<
data
->
joysticks
[
data
->
chosen_joystick
].
num_buttons
;
i
++
)
if
(
state
.
rgbButtons
[
i
])
...
...
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