Author: hbelusca Date: Sat Aug 30 16:18:07 2014 New Revision: 63991
URL: http://svn.reactos.org/svn/reactos?rev=63991&view=rev Log: [CONDRV] - In ConDrvChangeScreenBufferAttributes, change also the popup attributes. - In some functions we need to check validity of Read/WriteCoord parameters, add fixme for now, that need to be fixed later on.
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c URL: http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user/... ============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] Sat Aug 30 16:18:07 2014 @@ -363,7 +363,7 @@
COORD TopLeft = {0}; ULONG NumCodesToWrite; - USHORT OldScreenAttrib; + USHORT OldScreenAttrib, OldPopupAttrib;
if (Console == NULL || Buffer == NULL) { @@ -375,6 +375,7 @@
NumCodesToWrite = Buffer->ScreenBufferSize.X * Buffer->ScreenBufferSize.Y; OldScreenAttrib = Buffer->ScreenDefaultAttrib; + OldPopupAttrib = Buffer->PopupDefaultAttrib;
X = TopLeft.X; Y = (TopLeft.Y + Buffer->VirtualY) % Buffer->ScreenBufferSize.Y; @@ -395,10 +396,14 @@ /* Foreground color */ if ((Ptr->Attributes & 0x0F) == (OldScreenAttrib & 0x0F)) Ptr->Attributes = (Ptr->Attributes & 0xFFF0) | (NewScreenAttrib & 0x0F); + if ((Ptr->Attributes & 0x0F) == (OldPopupAttrib & 0x0F)) + Ptr->Attributes = (Ptr->Attributes & 0xFFF0) | (NewPopupAttrib & 0x0F);
/* Background color */ if ((Ptr->Attributes & 0xF0) == (OldScreenAttrib & 0xF0)) Ptr->Attributes = (Ptr->Attributes & 0xFF0F) | (NewScreenAttrib & 0xF0); + if ((Ptr->Attributes & 0xF0) == (OldPopupAttrib & 0xF0)) + Ptr->Attributes = (Ptr->Attributes & 0xFF0F) | (NewPopupAttrib & 0xF0);
// ++Ptr;
@@ -715,6 +720,10 @@ /* Validity checks */ ASSERT(Console == Buffer->Header.Console); ASSERT((StringBuffer != NULL) || (StringBuffer == NULL && NumCodesToRead == 0)); + + // + // FIXME: Make overflow checks on ReadCoord !!!!!! + //
if (NumCodesRead) *NumCodesRead = 0;
@@ -826,6 +835,10 @@ ASSERT(Console == Buffer->Header.Console); ASSERT((StringBuffer != NULL) || (StringBuffer == NULL && NumCodesToWrite == 0));
+ // + // FIXME: Make overflow checks on WriteCoord !!!!!! + // + if (NumCodesWritten) *NumCodesWritten = 0;
switch (CodeType) @@ -953,6 +966,10 @@
/* Validity check */ ASSERT(Console == Buffer->Header.Console); + + // + // FIXME: Make overflow checks on WriteCoord !!!!!! + //
if (NumCodesWritten) *NumCodesWritten = 0;