ddraw fix
Marko Kreen
marko at l-t.ee
Sun Nov 10 07:41:13 CST 2002
Following patch was needed to fix graphics in Grim Fandango.
Probably application bug: it called DIB_DirectDrawSurface_Blt
with .bottom > 36000, seems like DirectDraw sanitized the values.
--
marko
-------------- next part --------------
Index: dlls/ddraw/dsurface/dib.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/dsurface/dib.c,v
retrieving revision 1.17
diff -u -r1.17 dib.c
--- dlls/ddraw/dsurface/dib.c 18 Oct 2002 23:48:59 -0000 1.17
+++ dlls/ddraw/dsurface/dib.c 10 Nov 2002 09:01:54 -0000
@@ -395,6 +395,11 @@
}
}
+ if (xsrc.bottom > sdesc.dwHeight)
+ xsrc.bottom = sdesc.dwHeight;
+ if (xdst.bottom > ddesc.dwHeight)
+ xdst.bottom = ddesc.dwHeight;
+
if (src) assert((xsrc.bottom-xsrc.top) <= sdesc.dwHeight);
assert((xdst.bottom-xdst.top) <= ddesc.dwHeight);
More information about the wine-patches
mailing list