Author: jgardou Date: Mon Aug 2 17:25:09 2010 New Revision: 48417
URL: http://svn.reactos.org/svn/reactos?rev=48417&view=rev Log: [WIN32K] - Do not cast RGBQUAD to PALETTEENTRY or the other way around, you idiot. - Report success even when we're asked fo 0 ScanLines in NtGdiGetDIBitsInternal.
Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c
Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c URL: http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win3... ============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Mon Aug 2 17:25:09 2010 @@ -695,8 +695,7 @@ Info->bmiHeader.biYPelsPerMeter = 0; Info->bmiHeader.biClrUsed = 0; Info->bmiHeader.biClrImportant = 0; - ScanLines = 1; - /* Get Complete info now */ + ScanLines = abs(Info->bmiHeader.biHeight); goto done;
case 1: @@ -723,7 +722,12 @@ } } if(colors != 1 << bpp) Info->bmiHeader.biClrUsed = colors; - RtlCopyMemory(rgbQuads, psurf->ppal->IndexedColors, colors * sizeof(RGBQUAD)); + for(i=0; i < colors; i++) + { + rgbQuads[i].rgbRed = psurf->ppal->IndexedColors[i].peRed; + rgbQuads[i].rgbGreen = psurf->ppal->IndexedColors[i].peGreen; + rgbQuads[i].rgbBlue = psurf->ppal->IndexedColors[i].peBlue; + } } else { @@ -977,6 +981,7 @@ GreDeleteObject(hBmpDest); EXLATEOBJ_vCleanup(&exlo); } + else ScanLines = abs(height);
done:
@@ -1037,6 +1042,7 @@ return 0; }
+ /* Set bits */ _SEH2_TRY { ProbeForRead(Bits, cjMaxBits, 1);