Skip to content

Commit d4c329f

Browse files
committed
add some debug code
1 parent e3af573 commit d4c329f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/ddsurface.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,16 @@ HRESULT dds_Blt(
7474
RECT dst_rect = { 0, 0, This->width, This->height };
7575

7676
if (lpSrcRect && src_surface)
77-
memcpy(&src_rect, lpSrcRect, sizeof(src_rect));
77+
{
78+
//dbg_print_rect("lpSrcRect", lpSrcRect);
79+
src_rect = *lpSrcRect;
80+
}
7881

7982
if (lpDestRect)
80-
memcpy(&dst_rect, lpDestRect, sizeof(dst_rect));
83+
{
84+
//dbg_print_rect("lpDestRect", lpDestRect);
85+
dst_rect = *lpDestRect;
86+
}
8187

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

458464
if (lpSrcRect && src_surface)
459-
memcpy(&src_rect, lpSrcRect, sizeof(src_rect));
465+
{
466+
//dbg_print_rect("lpSrcRect", lpSrcRect);
467+
src_rect = *lpSrcRect;
468+
}
460469

461470
int dst_x = dwX;
462471
int dst_y = dwY;

0 commit comments

Comments
 (0)