/**@file\r
Private data structures for the Console Splitter driver\r
\r
-Copyright (c) 2006 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
\r
**/\r
\r
-#ifndef _CON_SPLITER_H_\r
-#define _CON_SPLITER_H_\r
+#ifndef _CON_SPLITTER_H_\r
+#define _CON_SPLITTER_H_\r
\r
//\r
// Private Data Structures\r
/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
+Copyright (c) 2006 - 2007, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
)\r
{\r
UINTN SrcY;\r
+ BOOLEAN Forward; \r
UINTN Index;\r
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltPtr;\r
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ScreenPtr;\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- ScreenPtr = &Private->GraphicsOutputBlt[DestinationY * HorizontalResolution + DestinationX];\r
- SrcY = SourceY;\r
- while (Height) {\r
+ if ((BltOperation == EfiBltVideoToVideo) && (DestinationY > SourceY)) {\r
+ //\r
+ // Copy backwards, only care the Video to Video Blt\r
+ //\r
+ ScreenPtr = &Private->GraphicsOutputBlt[(DestinationY + Height - 1) * HorizontalResolution + DestinationX];\r
+ SrcY = SourceY + Height - 1;\r
+ Forward = FALSE;\r
+ } else {\r
+ //\r
+ // Copy forwards, for other cases\r
+ //\r
+ ScreenPtr = &Private->GraphicsOutputBlt[DestinationY * HorizontalResolution + DestinationX];\r
+ SrcY = SourceY;\r
+ Forward = TRUE;\r
+ }\r
+\r
+ while (Height != 0) {\r
if (BltOperation == EfiBltVideoFill) {\r
for (Index = 0; Index < Width; Index++) {\r
ScreenPtr[Index] = *BltBuffer;\r
CopyMem (ScreenPtr, BltPtr, Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
}\r
\r
- ScreenPtr += HorizontalResolution;\r
- SrcY++;\r
+ if (Forward) {\r
+ ScreenPtr += HorizontalResolution;\r
+ SrcY ++;\r
+ } else {\r
+ ScreenPtr -= HorizontalResolution;\r
+ SrcY --;\r
+ }\r
Height--;\r
}\r
}\r
)\r
{\r
UINTN SrcY;\r
+ BOOLEAN Forward;\r
UINTN Index;\r
EFI_UGA_PIXEL *BltPtr;\r
EFI_UGA_PIXEL *ScreenPtr;\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- ScreenPtr = &Private->UgaBlt[DestinationY * HorizontalResolution + DestinationX];\r
- SrcY = SourceY;\r
- while (Height) {\r
+ if ((BltOperation == EfiUgaVideoToVideo) && (DestinationY > SourceY)) {\r
+ //\r
+ // Copy backwards, only care the Video to Video Blt\r
+ //\r
+ ScreenPtr = &Private->UgaBlt[(DestinationY + Height - 1) * HorizontalResolution + DestinationX];\r
+ SrcY = SourceY + Height - 1;\r
+ Forward = FALSE;\r
+ } else {\r
+ //\r
+ // Copy forwards, for other cases\r
+ //\r
+ ScreenPtr = &Private->UgaBlt[DestinationY * HorizontalResolution + DestinationX];\r
+ SrcY = SourceY;\r
+ Forward = TRUE;\r
+ }\r
+\r
+ while (Height != 0) {\r
if (BltOperation == EfiUgaVideoFill) {\r
for (Index = 0; Index < Width; Index++) {\r
ScreenPtr[Index] = *BltBuffer;\r
CopyMem (ScreenPtr, BltPtr, Width * sizeof (EFI_UGA_PIXEL));\r
}\r
\r
- ScreenPtr += HorizontalResolution;\r
- SrcY++;\r
+ if (Forward) {\r
+ ScreenPtr += HorizontalResolution;\r
+ SrcY ++;\r
+ } else {\r
+ ScreenPtr -= HorizontalResolution;\r
+ SrcY --;\r
+ }\r
Height--;\r
}\r
}\r
/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
+Copyright (c) 2006 - 2007, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
{\r
EFI_HII_GLOBAL_DATA *GlobalData;\r
EFI_HII_DATA *HiiData;\r
- UINTN Count;\r
- BOOLEAN Narrow;\r
- UINTN Location;\r
- UINT8 GlyphCol1[19];\r
+ BOOLEAN WideChar;\r
+ INT32 Location;\r
\r
if (This == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
HiiData = EFI_HII_DATA_FROM_THIS (This);\r
-\r
GlobalData = HiiData->GlobalData;\r
- Count = 0;\r
- Narrow = TRUE;\r
\r
- ZeroMem (GlyphCol1, sizeof (GlyphCol1));\r
+ \r
+ //\r
+ // Rewind through the string looking for a glyph width identifier\r
+ // If no width identifier exists, we assume string has narrow width identifier\r
+ //\r
+ for (WideChar = FALSE, Location = (INT32) *FirstMissing; Location >= 0; Location--) {\r
+ if ((StringToTest[Location] == NARROW_CHAR) || (StringToTest[Location] == WIDE_CHAR)) {\r
+ //\r
+ // We found something that identifies what glyph database to look in\r
+ //\r
+ WideChar = (BOOLEAN) (StringToTest[Location] == WIDE_CHAR);\r
+ break;\r
+ }\r
+ }\r
\r
//\r
// Walk through the string until you hit the null terminator\r
//\r
- for (; StringToTest[*FirstMissing] != 0x00; (*FirstMissing)++) {\r
- Location = *FirstMissing;\r
+ for (*GlyphBufferSize = 0; StringToTest[*FirstMissing] != CHAR_NULL; (*FirstMissing)++) {\r
//\r
- // Rewind through the string looking for a glyph width identifier\r
+ // We found something that identifies what glyph database to look in\r
//\r
- for (; Location != 0; Location--) {\r
- if (StringToTest[Location] == NARROW_CHAR || StringToTest[Location] == WIDE_CHAR) {\r
- //\r
- // We found something that identifies what glyph database to look in\r
- //\r
- if (StringToTest[Location] == WIDE_CHAR) {\r
- Narrow = FALSE;\r
- } else {\r
- Narrow = TRUE;\r
- }\r
- }\r
+ if ((StringToTest[*FirstMissing] == NARROW_CHAR) || (StringToTest[*FirstMissing] == WIDE_CHAR)) {\r
+ WideChar = (BOOLEAN) (StringToTest[*FirstMissing] == WIDE_CHAR);\r
+ continue;\r
}\r
\r
- if (Narrow) {\r
+ if (!WideChar) {\r
if (CompareMem (\r
GlobalData->NarrowGlyphs[StringToTest[*FirstMissing]].GlyphCol1,\r
&mUnknownGlyph,\r
}\r
}\r
\r
- Count++;\r
- }\r
-\r
- if (Narrow) {\r
- *GlyphBufferSize = (UINT32) (Count * sizeof (EFI_NARROW_GLYPH));\r
- } else {\r
- *GlyphBufferSize = (UINT32) (Count * sizeof (EFI_WIDE_GLYPH));\r
+ *GlyphBufferSize += (WideChar ? sizeof (EFI_WIDE_GLYPH) : sizeof (EFI_NARROW_GLYPH));\r
}\r
\r
return EFI_SUCCESS;\r
/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
+Copyright (c) 2006 - 2007, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
)\r
{\r
UINTN Index;\r
- UINTN Loop;\r
UINT16 Width;\r
UINTN Row;\r
UINTN OriginalRow;\r
ProcessOptions (MenuOption, FALSE, FileFormTagsHead, PageData, &OptionString);\r
\r
if (OptionString != NULL) {\r
- //\r
- // If leading spaces on OptionString - remove the spaces\r
- //\r
- for (Index = 0; OptionString[Index] == L' '; Index++)\r
- ;\r
-\r
- for (Loop = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
- OptionString[Loop] = OptionString[Index];\r
- Loop++;\r
- }\r
-\r
- OptionString[Loop] = CHAR_NULL;\r
-\r
Width = (UINT16) gOptionBlockWidth;\r
\r
OriginalRow = Row;\r
ProcessOptions (MenuOption, FALSE, FileFormTagsHead, PageData, &OptionString);\r
\r
if (OptionString != NULL) {\r
- //\r
- // If leading spaces on OptionString - remove the spaces\r
- //\r
- for (Index = 0; OptionString[Index] == L' '; Index++) {\r
- MenuOption->OptCol++;\r
- }\r
+ if (MenuOption->ThisTag->Operand == EFI_IFR_DATE_OP ||\r
+ MenuOption->ThisTag->Operand == EFI_IFR_TIME_OP\r
+ ) {\r
+ //\r
+ // If leading spaces on OptionString - remove the spaces\r
+ //\r
+ for (Index = 0; OptionString[Index] == L' '; Index++) {\r
+ MenuOption->OptCol++;\r
+ }\r
\r
- for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
- OptionString[Count] = OptionString[Index];\r
- Count++;\r
- }\r
+ for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
+ OptionString[Count] = OptionString[Index];\r
+ Count++;\r
+ }\r
\r
- OptionString[Count] = CHAR_NULL;\r
+ OptionString[Count] = CHAR_NULL;\r
+ }\r
\r
//\r
// If this is a date or time op-code and is used to reflect an RTC, register the op-code\r
ProcessOptions (MenuOption, FALSE, FileFormTagsHead, PageData, &OptionString);\r
gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);\r
if (OptionString != NULL) {\r
- //\r
- // If leading spaces on OptionString - remove the spaces\r
- //\r
- for (Index = 0; OptionString[Index] == L' '; Index++)\r
- ;\r
+ if (MenuOption->ThisTag->Operand == EFI_IFR_DATE_OP ||\r
+ MenuOption->ThisTag->Operand == EFI_IFR_TIME_OP\r
+ ) {\r
+ //\r
+ // If leading spaces on OptionString - remove the spaces\r
+ //\r
+ for (Index = 0; OptionString[Index] == L' '; Index++)\r
+ ;\r
\r
- for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
- OptionString[Count] = OptionString[Index];\r
- Count++;\r
- }\r
+ for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
+ OptionString[Count] = OptionString[Index];\r
+ Count++;\r
+ }\r
\r
- OptionString[Count] = CHAR_NULL;\r
+ OptionString[Count] = CHAR_NULL;\r
+ }\r
\r
Width = (UINT16) gOptionBlockWidth;\r
\r
if (SubMenu) {\r
ProcessOptions (MenuOption, FALSE, FileFormTagsHead, PageData, &OptionString);\r
if (OptionString != NULL) {\r
- //\r
- // If leading spaces on OptionString - remove the spaces\r
- //\r
- for (Index = 0; OptionString[Index] == L' '; Index++)\r
- ;\r
-\r
- for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
- OptionString[Count] = OptionString[Index];\r
- Count++;\r
- }\r
+ if (MenuOption->ThisTag->Operand == EFI_IFR_DATE_OP ||\r
+ MenuOption->ThisTag->Operand == EFI_IFR_TIME_OP\r
+ ) {\r
+ //\r
+ // If leading spaces on OptionString - remove the spaces\r
+ //\r
+ for (Index = 0; OptionString[Index] == L' '; Index++)\r
+ ;\r
\r
- OptionString[Count] = CHAR_NULL;\r
+ for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
+ OptionString[Count] = OptionString[Index];\r
+ Count++;\r
+ }\r
\r
+ OptionString[Count] = CHAR_NULL;\r
+ }\r
Width = (UINT16) gOptionBlockWidth;\r
\r
OriginalRow = MenuOption->Row;\r