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
a80a8142
Commit
a80a8142
authored
Jul 10, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed corruption when copying to the same surface (with the help of
Tony Lambregts and Lionel Ulmer).
parent
ee2ecf22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
6 deletions
+34
-6
dib.c
dlls/ddraw/dsurface/dib.c
+34
-6
No files found.
dlls/ddraw/dsurface/dib.c
View file @
a80a8142
...
...
@@ -482,11 +482,39 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
/* No stretching in either direction. This needs to be as
* fast as possible */
sbuf
=
sbase
;
for
(
y
=
0
;
y
<
dstheight
;
y
++
)
{
memcpy
(
dbuf
,
sbuf
,
width
);
sbuf
+=
sdesc
.
u1
.
lPitch
;
dbuf
+=
ddesc
.
u1
.
lPitch
;
}
/* check for overlapping surfaces */
if
(
src
!=
iface
||
xdst
.
top
<
xsrc
.
top
||
xdst
.
right
<=
xsrc
.
left
||
xsrc
.
right
<=
xdst
.
left
)
{
/* no overlap, or dst above src, so copy from top downwards */
for
(
y
=
0
;
y
<
dstheight
;
y
++
)
{
memcpy
(
dbuf
,
sbuf
,
width
);
sbuf
+=
sdesc
.
u1
.
lPitch
;
dbuf
+=
ddesc
.
u1
.
lPitch
;
}
}
else
if
(
xdst
.
top
>
xsrc
.
top
)
/* copy from bottom upwards */
{
sbuf
+=
(
sdesc
.
u1
.
lPitch
*
dstheight
);
dbuf
+=
(
ddesc
.
u1
.
lPitch
*
dstheight
);
for
(
y
=
0
;
y
<
dstheight
;
y
++
)
{
sbuf
-=
sdesc
.
u1
.
lPitch
;
dbuf
-=
ddesc
.
u1
.
lPitch
;
memcpy
(
dbuf
,
sbuf
,
width
);
}
}
else
/* src and dst overlapping on the same line, use memmove */
{
for
(
y
=
0
;
y
<
dstheight
;
y
++
)
{
memmove
(
dbuf
,
sbuf
,
width
);
sbuf
+=
sdesc
.
u1
.
lPitch
;
dbuf
+=
ddesc
.
u1
.
lPitch
;
}
}
}
else
{
/* Stretching in Y direction only */
for
(
y
=
sy
=
0
;
y
<
dstheight
;
y
++
,
sy
+=
yinc
)
{
...
...
@@ -559,7 +587,7 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
}
else
{
keylow
=
lpbltfx
->
ddckDestColorkey
.
dwColorSpaceLowValue
;
keyhigh
=
lpbltfx
->
ddckDestColorkey
.
dwColorSpaceHighValue
;
}
}
for
(
y
=
sy
=
0
;
y
<
dstheight
;
y
++
,
sy
+=
yinc
)
{
sbuf
=
sbase
+
(
sy
>>
16
)
*
sdesc
.
u1
.
lPitch
;
...
...
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