Skip to content

Commit

Permalink
add some debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Nov 4, 2024
1 parent e3af573 commit d4c329f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/ddsurface.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@ HRESULT dds_Blt(
RECT dst_rect = { 0, 0, This->width, This->height };

if (lpSrcRect && src_surface)
memcpy(&src_rect, lpSrcRect, sizeof(src_rect));
{
//dbg_print_rect("lpSrcRect", lpSrcRect);
src_rect = *lpSrcRect;
}

if (lpDestRect)
memcpy(&dst_rect, lpDestRect, sizeof(dst_rect));
{
//dbg_print_rect("lpDestRect", lpDestRect);
dst_rect = *lpDestRect;
}

int src_w = src_rect.right - src_rect.left;
int src_h = src_rect.bottom - src_rect.top;
Expand Down Expand Up @@ -456,7 +462,10 @@ HRESULT dds_BltFast(
RECT src_rect = { 0, 0, src_surface ? src_surface->width : 0, src_surface ? src_surface->height : 0 };

if (lpSrcRect && src_surface)
memcpy(&src_rect, lpSrcRect, sizeof(src_rect));
{
//dbg_print_rect("lpSrcRect", lpSrcRect);
src_rect = *lpSrcRect;
}

int dst_x = dwX;
int dst_y = dwY;
Expand Down

0 comments on commit d4c329f

Please sign in to comment.