From ee6266519ab289fa8b18cfc4a5b74f7f8fe7a05a Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sat, 17 Nov 2018 04:46:36 +0100 Subject: [PATCH] remove src_w and src_h from bltfast --- src/surface.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/surface.c b/src/surface.c index c008c31..c66637a 100644 --- a/src/surface.c +++ b/src/surface.c @@ -156,7 +156,7 @@ HRESULT __stdcall ddraw_surface_Blt(IDirectDrawSurfaceImpl *This, LPRECT lpDestR unsigned char color = (unsigned char)lpDDBltFx->dwFillColor; for (x = 0; x < dst_w; x++) - dst[x] = color; + firstRow[x] = color; } else if (This->bpp == 16) { @@ -312,12 +312,10 @@ HRESULT __stdcall ddraw_surface_BltFast(IDirectDrawSurfaceImpl *This, DWORD dst_ srcRect.bottom = Source->height; } - int src_w = srcRect.right - srcRect.left; - int src_h = srcRect.bottom - srcRect.top; int src_x = srcRect.left; int src_y = srcRect.top; - RECT dstRect = { dst_x, dst_y, src_w + dst_x, src_h + dst_y }; + RECT dstRect = { dst_x, dst_y, (srcRect.right - srcRect.left) + dst_x, (srcRect.bottom - srcRect.top) + dst_y }; if (dstRect.right > This->width) dstRect.right = This->width;