mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 14:03:14 +00:00
[WIN32K]
Simplify and fix calculation of biCompression in GreGetDIBitsInternal svn path=/trunk/; revision=65892
This commit is contained in:
parent
7c39a4ecb6
commit
2bcae18ec6
1 changed files with 3 additions and 14 deletions
|
@ -737,20 +737,9 @@ GreGetDIBitsInternal(
|
||||||
Info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes( Info->bmiHeader.biWidth,
|
Info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes( Info->bmiHeader.biWidth,
|
||||||
Info->bmiHeader.biHeight,
|
Info->bmiHeader.biHeight,
|
||||||
Info->bmiHeader.biBitCount);
|
Info->bmiHeader.biBitCount);
|
||||||
if(psurf->hSecure)
|
|
||||||
{
|
if ((Info->bmiHeader.biBitCount == 16) ||
|
||||||
switch(Info->bmiHeader.biBitCount)
|
(Info->bmiHeader.biBitCount == 32))
|
||||||
{
|
|
||||||
case 16:
|
|
||||||
case 32:
|
|
||||||
Info->bmiHeader.biCompression = BI_BITFIELDS;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Info->bmiHeader.biCompression = BI_RGB;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(Info->bmiHeader.biBitCount > 8)
|
|
||||||
{
|
{
|
||||||
Info->bmiHeader.biCompression = BI_BITFIELDS;
|
Info->bmiHeader.biCompression = BI_BITFIELDS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue