mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
gdi32: Properly handle SetDIBits failure in StretchDIBits.
This commit is contained in:
parent
66386eb46d
commit
5953a86ab1
@ -290,13 +290,13 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
|
||||
dwRop );
|
||||
}
|
||||
|
||||
SetDIBits(hdcMem, hBitmap, 0, height, bits, info, wUsage);
|
||||
heightSrc = SetDIBits(hdcMem, hBitmap, 0, height, bits, info, wUsage);
|
||||
|
||||
/* Origin for DIBitmap may be bottom left (positive biHeight) or top
|
||||
left (negative biHeight) */
|
||||
StretchBlt( hdc, xDst, yDst, widthDst, heightDst,
|
||||
hdcMem, xSrc, abs(height) - heightSrc - ySrc,
|
||||
widthSrc, heightSrc, dwRop );
|
||||
if (heightSrc) StretchBlt( hdc, xDst, yDst, widthDst, heightDst,
|
||||
hdcMem, xSrc, abs(height) - heightSrc - ySrc,
|
||||
widthSrc, heightSrc, dwRop );
|
||||
if(hpal)
|
||||
SelectPalette(hdcMem, hpal, FALSE);
|
||||
SelectObject( hdcMem, hOldBitmap );
|
||||
|
Loading…
Reference in New Issue
Block a user