| 224 | } |
| 225 | |
| 226 | static VOID DrawScreenHeader(IN CONST CHAR16 *Title) |
| 227 | { |
| 228 | UINTN i; |
| 229 | CHAR16* BannerLine = (__typeof__(BannerLine))AllocatePool((ConWidth + 1) * sizeof(CHAR16)); |
| 230 | BannerLine[ConWidth] = 0; |
| 231 | |
| 232 | // clear to black background |
| 233 | //gST->ConOut->SetAttribute(gST->ConOut, ATTR_BASIC); |
| 234 | //gST->ConOut->ClearScreen (gST->ConOut); |
| 235 | |
| 236 | // paint header background |
| 237 | gST->ConOut->SetAttribute(gST->ConOut, ATTR_BANNER); |
| 238 | |
| 239 | for (i = 1; i < ConWidth-1; i++) { |
| 240 | BannerLine[i] = BOXDRAW_HORIZONTAL; |
| 241 | } |
| 242 | |
| 243 | BannerLine[0] = BOXDRAW_DOWN_RIGHT; |
| 244 | BannerLine[ConWidth-1] = BOXDRAW_DOWN_LEFT; |
| 245 | gST->ConOut->SetCursorPosition (gST->ConOut, 0, 0); |
| 246 | printf("%ls", BannerLine); |
| 247 | |
| 248 | for (i = 1; i < ConWidth-1; i++) |
| 249 | BannerLine[i] = ' '; |
| 250 | BannerLine[0] = BOXDRAW_VERTICAL; |
| 251 | BannerLine[ConWidth-1] = BOXDRAW_VERTICAL; |
| 252 | gST->ConOut->SetCursorPosition (gST->ConOut, 0, 1); |
| 253 | printf("%ls", BannerLine); |
| 254 | |
| 255 | for (i = 1; i < ConWidth-1; i++) |
| 256 | BannerLine[i] = BOXDRAW_HORIZONTAL; |
| 257 | BannerLine[0] = BOXDRAW_UP_RIGHT; |
| 258 | BannerLine[ConWidth-1] = BOXDRAW_UP_LEFT; |
| 259 | gST->ConOut->SetCursorPosition (gST->ConOut, 0, 2); |
| 260 | printf("%ls", BannerLine); |
| 261 | |
| 262 | FreePool(BannerLine); |
| 263 | |
| 264 | // print header text |
| 265 | gST->ConOut->SetCursorPosition (gST->ConOut, 3, 1); |
| 266 | printf("Clover rev %ls - %ls", gFirmwareRevision, Title); |
| 267 | |
| 268 | // reposition cursor |
| 269 | gST->ConOut->SetAttribute (gST->ConOut, ATTR_BASIC); |
| 270 | gST->ConOut->SetCursorPosition (gST->ConOut, 0, 4); |
| 271 | } |
| 272 | |
| 273 | |
| 274 | // |
no test coverage detected