| 494 | // |
| 495 | |
| 496 | static VOID UpdateConsoleVars() |
| 497 | { |
| 498 | UINTN i; |
| 499 | |
| 500 | // get size of text console |
| 501 | if (gST->ConOut->QueryMode(gST->ConOut, gST->ConOut->Mode->Mode, &ConWidth, &ConHeight) != EFI_SUCCESS) { |
| 502 | // use default values on error |
| 503 | ConWidth = 80; |
| 504 | ConHeight = 25; |
| 505 | } |
| 506 | |
| 507 | // free old BlankLine when it exists |
| 508 | if (BlankLine != NULL) { |
| 509 | FreePool(BlankLine); |
| 510 | } |
| 511 | |
| 512 | // make a buffer for a whole text line |
| 513 | BlankLine = (__typeof__(BlankLine))AllocatePool((ConWidth + 1) * sizeof(CHAR16)); |
| 514 | |
| 515 | for (i = 0; i < ConWidth; i++) { |
| 516 | BlankLine[i] = ' '; |
| 517 | } |
| 518 | |
| 519 | BlankLine[i] = 0; |
| 520 | } |
no test coverage detected