mirror of
https://github.com/reactos/reactos.git
synced 2025-05-08 03:07:05 +00:00
[WIN32K] IntEngBitBlt returns BOOL, not NTSTATUS!
Fix usage in NtGdiSetDIBitsToDeviceInternal accordingly and get rid of NTSTATUS variable entirely. svn path=/trunk/; revision=75553
This commit is contained in:
parent
a5b5ed5bd3
commit
cdcf2da12e
1 changed files with 15 additions and 18 deletions
|
@ -470,8 +470,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
IN BOOL bTransformCoordinates,
|
IN BOOL bTransformCoordinates,
|
||||||
IN OPTIONAL HANDLE hcmXform)
|
IN OPTIONAL HANDLE hcmXform)
|
||||||
{
|
{
|
||||||
INT ret = 0;
|
INT ret;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
|
||||||
PDC pDC = NULL;
|
PDC pDC = NULL;
|
||||||
HBITMAP hSourceBitmap = NULL, hMaskBitmap = NULL;
|
HBITMAP hSourceBitmap = NULL, hMaskBitmap = NULL;
|
||||||
SURFOBJ *pDestSurf, *pSourceSurf = NULL, *pMaskSurf = NULL;
|
SURFOBJ *pDestSurf, *pSourceSurf = NULL, *pMaskSurf = NULL;
|
||||||
|
@ -483,6 +482,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
EXLATEOBJ exlo;
|
EXLATEOBJ exlo;
|
||||||
PPALETTE ppalDIB = NULL;
|
PPALETTE ppalDIB = NULL;
|
||||||
LPBITMAPINFO pbmiSafe;
|
LPBITMAPINFO pbmiSafe;
|
||||||
|
BOOL bResult;
|
||||||
|
|
||||||
if (!Bits) return 0;
|
if (!Bits) return 0;
|
||||||
|
|
||||||
|
@ -498,19 +498,16 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
Status = _SEH2_GetExceptionCode();
|
ret = 0;
|
||||||
}
|
|
||||||
_SEH2_END
|
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
_SEH2_END
|
||||||
|
|
||||||
ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan);
|
ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan);
|
||||||
if (ScanLines == 0)
|
if (ScanLines == 0)
|
||||||
{
|
{
|
||||||
DPRINT1("ScanLines == 0\n");
|
DPRINT1("ScanLines == 0\n");
|
||||||
|
ret = 0;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,11 +515,13 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
if (!pDC)
|
if (!pDC)
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
ret = 0;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDC->dctype == DC_TYPE_INFO)
|
if (pDC->dctype == DC_TYPE_INFO)
|
||||||
{
|
{
|
||||||
|
ret = 0;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,14 +563,14 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
if (!hSourceBitmap)
|
if (!hSourceBitmap)
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||||
Status = STATUS_NO_MEMORY;
|
ret = 0;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
pSourceSurf = EngLockSurface((HSURF)hSourceBitmap);
|
pSourceSurf = EngLockSurface((HSURF)hSourceBitmap);
|
||||||
if (!pSourceSurf)
|
if (!pSourceSurf)
|
||||||
{
|
{
|
||||||
Status = STATUS_UNSUCCESSFUL;
|
ret = 0;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -586,13 +585,13 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
if (!hMaskBitmap)
|
if (!hMaskBitmap)
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||||
Status = STATUS_NO_MEMORY;
|
ret = 0;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
pMaskSurf = EngLockSurface((HSURF)hMaskBitmap);
|
pMaskSurf = EngLockSurface((HSURF)hMaskBitmap);
|
||||||
if (!pMaskSurf)
|
if (!pMaskSurf)
|
||||||
{
|
{
|
||||||
Status = STATUS_UNSUCCESSFUL;
|
ret = 0;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -602,7 +601,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
if (!ppalDIB)
|
if (!ppalDIB)
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||||
Status = STATUS_NO_MEMORY;
|
ret = 0;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -632,7 +631,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
DPRINT("BitsToDev with dstsurf=(%d|%d) (%d|%d), src=(%d|%d) w=%d h=%d\n",
|
DPRINT("BitsToDev with dstsurf=(%d|%d) (%d|%d), src=(%d|%d) w=%d h=%d\n",
|
||||||
rcDest.left, rcDest.top, rcDest.right, rcDest.bottom,
|
rcDest.left, rcDest.top, rcDest.right, rcDest.bottom,
|
||||||
ptSource.x, ptSource.y, SourceSize.cx, SourceSize.cy);
|
ptSource.x, ptSource.y, SourceSize.cx, SourceSize.cy);
|
||||||
Status = IntEngBitBlt(pDestSurf,
|
bResult = IntEngBitBlt(pDestSurf,
|
||||||
pSourceSurf,
|
pSourceSurf,
|
||||||
pMaskSurf,
|
pMaskSurf,
|
||||||
(CLIPOBJ *)&pDC->co,
|
(CLIPOBJ *)&pDC->co,
|
||||||
|
@ -650,11 +649,9 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
/* We're done */
|
/* We're done */
|
||||||
DC_vFinishBlit(pDC, NULL);
|
DC_vFinishBlit(pDC, NULL);
|
||||||
|
|
||||||
|
ret = bResult ? ScanLines : 0;
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
if (NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
ret = ScanLines;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ppalDIB) PALETTE_ShareUnlockPalette(ppalDIB);
|
if (ppalDIB) PALETTE_ShareUnlockPalette(ppalDIB);
|
||||||
if (pSourceSurf) EngUnlockSurface(pSourceSurf);
|
if (pSourceSurf) EngUnlockSurface(pSourceSurf);
|
||||||
|
|
Loading…
Reference in a new issue