Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
871ef449
Commit
871ef449
authored
Jan 05, 2004
by
Marcus Meissner
Committed by
Alexandre Julliard
Jan 05, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle DIJOYSTATE and DIJOYSTATE2 structs, fail on unknown sizes.
parent
6db772cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
linux.c
dlls/dinput/joystick/linux.c
+3
-2
linuxinput.c
dlls/dinput/joystick/linuxinput.c
+4
-3
No files found.
dlls/dinput/joystick/linux.c
View file @
871ef449
...
...
@@ -82,7 +82,7 @@ struct JoystickImpl
LONG
lMin
,
lMax
,
deadzone
;
LPDIDEVICEOBJECTDATA
data_queue
;
int
queue_head
,
queue_tail
,
queue_len
;
DIJOYSTATE
js
;
DIJOYSTATE
2
js
;
};
static
GUID
DInput_Wine_Joystick_GUID
=
{
/* 9e573ed9-7734-11d2-8d4a-23903fb6bdf7 */
...
...
@@ -368,8 +368,9 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceState(
joy_polldev
(
This
);
TRACE
(
"(this=%p,0x%08lx,%p)
\n
"
,
This
,
len
,
ptr
);
if
(
len
!=
sizeof
(
DIJOYSTATE
))
{
if
(
(
len
!=
sizeof
(
DIJOYSTATE
))
&&
(
len
!=
sizeof
(
DIJOYSTATE2
)
))
{
FIXME
(
"len %ld is not sizeof(DIJOYSTATE), unsupported format.
\n
"
,
len
);
return
E_FAIL
;
}
memcpy
(
ptr
,
&
(
This
->
js
),
len
);
This
->
queue_head
=
0
;
...
...
dlls/dinput/joystick/linuxinput.c
View file @
871ef449
...
...
@@ -98,7 +98,7 @@ struct JoystickImpl
HANDLE
hEvent
;
LPDIDEVICEOBJECTDATA
data_queue
;
int
queue_head
,
queue_tail
,
queue_len
;
DIJOYSTATE
js
;
DIJOYSTATE
2
js
;
/* data returned by the EVIOCGABS() ioctl */
int
axes
[
ABS_MAX
+
1
][
5
];
...
...
@@ -561,8 +561,9 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceState(
joy_polldev
(
This
);
TRACE
(
"(this=%p,0x%08lx,%p)
\n
"
,
This
,
len
,
ptr
);
if
(
len
!=
sizeof
(
DIJOYSTATE
))
{
FIXME
(
"len %ld is not sizeof(DIJOYSTATE), unsupported format.
\n
"
,
len
);
if
((
len
!=
sizeof
(
DIJOYSTATE
))
&&
(
len
!=
sizeof
(
DIJOYSTATE2
)))
{
FIXME
(
"len %ld is not sizeof(DIJOYSTATE) or DIJOYSTATE2, unsupported format.
\n
"
,
len
);
return
E_FAIL
;
}
memcpy
(
ptr
,
&
(
This
->
js
),
len
);
This
->
queue_head
=
0
;
...
...
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