OcBlitLib: Fix broken optimisation (not working with max w blits at 0)

This commit is contained in:
vit9696 2021-05-09 22:47:52 +03:00
parent 3c283f662a
commit bfbe8037f6
2 changed files with 8 additions and 8 deletions

View File

@ -241,8 +241,8 @@ BlitLibBufferToVideo270 (
DestinationWalker = Destination;
SourceWalker = Source;
LastX = Configure->Height - DestinationX - 1;
for (IndexX = LastX; IndexX > LastX - Width; IndexX--) {
DestinationWalker[IndexX * PixelsPerScanLine] = *SourceWalker++;
for (IndexX = 0; IndexX < Width; IndexX++) {
DestinationWalker[(LastX - IndexX) * PixelsPerScanLine] = *SourceWalker++;
}
Source += DeltaPixels;
Destination++;
@ -253,9 +253,9 @@ BlitLibBufferToVideo270 (
DestinationWalker = Destination;
SourceWalker = Source;
LastX = Configure->Height - DestinationX - 1;
for (IndexX = LastX; IndexX > LastX - Width; IndexX--) {
for (IndexX = 0; IndexX < Width; IndexX++) {
Uint32 = *SourceWalker++;
DestinationWalker[IndexX * PixelsPerScanLine] =
DestinationWalker[(LastX - IndexX) * PixelsPerScanLine] =
(UINT32) (
(((Uint32 << Configure->PixelShl[0]) >> Configure->PixelShr[0]) &
Configure->PixelMasks.RedMask) |

View File

@ -241,8 +241,8 @@ BlitLibVideoToBuffer270 (
DestinationWalker = Destination;
SourceWalker = Source;
LastX = Configure->Height - SourceX - 1;
for (IndexX = LastX; IndexX > LastX - Width; IndexX--) {
*DestinationWalker++ = SourceWalker[IndexX * PixelsPerScanLine];
for (IndexX = 0; IndexX < Width; IndexX++) {
*DestinationWalker++ = SourceWalker[(LastX - IndexX) * PixelsPerScanLine];
}
Source++;
Destination += DeltaPixels;
@ -253,8 +253,8 @@ BlitLibVideoToBuffer270 (
DestinationWalker = Destination;
SourceWalker = Source;
LastX = Configure->Height - SourceX - 1;
for (IndexX = LastX; IndexX > LastX - Width; IndexX--) {
Uint32 = SourceWalker[IndexX * PixelsPerScanLine];
for (IndexX = 0; IndexX < Width; IndexX++) {
Uint32 = SourceWalker[(LastX - IndexX) * PixelsPerScanLine];
*DestinationWalker++ =
(UINT32) (
(((Uint32 << Configure->PixelShl[0]) >> Configure->PixelShr[0]) &