mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
- IntGetDeviceGammaRamp: remove unneeded code, i * 256 is always smaller than 65535 (255*256=65280 is the biggest value), CID 35
- IntSetDeviceGammaRamp: don't copy data to NULL buffer, CID 195 svn path=/trunk/; revision=37944
This commit is contained in:
parent
e20af6d632
commit
e9c0e48377
1 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,6 @@ IntGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp)
|
|||
for(i=0; i<256; i++ )
|
||||
{
|
||||
int NewValue = i * 256;
|
||||
if (NewValue > 65535) NewValue = 65535;
|
||||
|
||||
Ramp->Red[i] = Ramp->Green[i] = Ramp->Blue[i] = ((WORD)NewValue);
|
||||
}
|
||||
|
@ -350,7 +349,8 @@ IntSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Test)
|
|||
pGDev->pvGammaRamp = ExAllocatePoolWithTag(PagedPool, sizeof(GAMMARAMP), TAG_GDIICM);
|
||||
pGDev->flFlags |= PDEV_GAMMARAMP_TABLE;
|
||||
}
|
||||
RtlCopyMemory( pGDev->pvGammaRamp, Ramp, sizeof(GAMMARAMP));
|
||||
if (pGDev->pvGammaRamp)
|
||||
RtlCopyMemory( pGDev->pvGammaRamp, Ramp, sizeof(GAMMARAMP));
|
||||
|
||||
Ret = UpdateDeviceGammaRamp(hPDev);
|
||||
|
||||
|
|
Loading…
Reference in a new issue