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
c5b0a179
Commit
c5b0a179
authored
Jan 25, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Jan 25, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy data structures one at a time using supplied size.
parent
a43a250b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
17 deletions
+10
-17
joystick_linux.c
dlls/dinput/joystick_linux.c
+4
-8
mouse.c
dlls/dinput/mouse.c
+6
-9
No files found.
dlls/dinput/joystick_linux.c
View file @
c5b0a179
...
...
@@ -1060,18 +1060,14 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceData(
*
entries
=
0
;
nqtail
=
This
->
queue_tail
;
while
(
len
)
{
DWORD
span
=
((
This
->
queue_head
<
nqtail
)
?
This
->
queue_len
:
This
->
queue_head
)
-
nqtail
;
if
(
span
>
len
)
span
=
len
;
/* Copy the buffered data into the application queue */
memcpy
(
dod
+
*
entries
,
This
->
data_queue
+
nqtail
,
span
*
dodsize
);
memcpy
(
(
char
*
)
dod
+
*
entries
*
dodsize
,
This
->
data_queue
+
nqtail
,
dodsize
);
/* Advance position */
nqtail
+=
span
;
nqtail
++
;
if
(
nqtail
>=
This
->
queue_len
)
nqtail
-=
This
->
queue_len
;
*
entries
+=
span
;
len
-=
span
;
(
*
entries
)
++
;
len
--
;
}
}
...
...
dlls/dinput/mouse.c
View file @
c5b0a179
...
...
@@ -766,17 +766,14 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
*
entries
=
0
;
nqtail
=
This
->
queue_tail
;
while
(
len
)
{
DWORD
span
=
((
This
->
queue_head
<
nqtail
)
?
This
->
queue_len
:
This
->
queue_head
)
-
nqtail
;
if
(
span
>
len
)
span
=
len
;
/* Copy the buffered data into the application queue */
memcpy
(
dod
+
*
entries
,
This
->
data_queue
+
nqtail
,
span
*
dodsize
);
memcpy
(
(
char
*
)
dod
+
*
entries
*
dodsize
,
This
->
data_queue
+
nqtail
,
dodsize
);
/* Advance position */
nqtail
+=
span
;
if
(
nqtail
>=
This
->
queue_len
)
nqtail
-=
This
->
queue_len
;
*
entries
+=
span
;
len
-=
span
;
nqtail
++
;
if
(
nqtail
>=
This
->
queue_len
)
nqtail
-=
This
->
queue_len
;
(
*
entries
)
++
;
len
--
;
}
}
if
(
!
(
flags
&
DIGDD_PEEK
))
...
...
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