File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ typedef struct IDirectDrawSurfaceImpl
2323
2424 ULONG ref ;
2525
26+ DWORD bpp ;
2627 DWORD width ;
2728 DWORD height ;
28- DWORD bpp ;
2929 DWORD size ;
3030 DWORD flags ;
3131 DWORD caps ;
Original file line number Diff line number Diff line change @@ -50,6 +50,15 @@ HRESULT dds_Blt(
5050 DWORD dwFlags ,
5151 LPDDBLTFX lpDDBltFx )
5252{
53+ if (lpDDSrcSurface &&
54+ lpDDSrcSurface -> bpp != 8 &&
55+ lpDDSrcSurface -> bpp != 16 &&
56+ lpDDSrcSurface -> bpp != 24 &&
57+ lpDDSrcSurface -> bpp != 32 )
58+ {
59+ return DDERR_INVALIDPARAMS ;
60+ }
61+
5362 dbg_dump_dds_blt_flags (dwFlags );
5463 dbg_dump_dds_blt_fx_flags ((dwFlags & DDBLT_DDFX ) && lpDDBltFx ? lpDDBltFx -> dwDDFX : 0 );
5564
@@ -77,13 +86,13 @@ HRESULT dds_Blt(
7786
7887 if (lpSrcRect && src_surface )
7988 {
80- // dbg_print_rect("lpSrcRect", lpSrcRect);
89+ dbg_print_rect ("lpSrcRect" , lpSrcRect );
8190 src_rect = * lpSrcRect ;
8291 }
8392
8493 if (lpDestRect )
8594 {
86- // dbg_print_rect("lpDestRect", lpDestRect);
95+ dbg_print_rect ("lpDestRect" , lpDestRect );
8796 dst_rect = * lpDestRect ;
8897 }
8998
You can’t perform that action at this time.
0 commit comments