mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Fixed bug 3096 - SDL_BlitSurface with overlapping source and destination
This commit is contained in:
parent
564c790f33
commit
aae28e3ec1
@ -109,10 +109,20 @@ SDL_BlitCopy(SDL_BlitInfo * info)
|
||||
overlap = (src < (dst + h*dstskip));
|
||||
}
|
||||
if (overlap) {
|
||||
while (h--) {
|
||||
SDL_memmove(dst, src, w);
|
||||
src += srcskip;
|
||||
dst += dstskip;
|
||||
if ( dst < src ) {
|
||||
while ( h-- ) {
|
||||
SDL_memmove(dst, src, w);
|
||||
src += srcskip;
|
||||
dst += dstskip;
|
||||
}
|
||||
} else {
|
||||
src += ((h-1) * srcskip);
|
||||
dst += ((h-1) * dstskip);
|
||||
while ( h-- ) {
|
||||
SDL_memmove(dst, src, w);
|
||||
src -= srcskip;
|
||||
dst -= dstskip;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user