MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / UpdateConsoleVars

Function UpdateConsoleVars

rEFIt_UEFI/refit/screen.cpp:496–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494//
495
496static 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}

Callers 2

InitScreenFunction · 0.85
SetNextScreenModeFunction · 0.85

Calls 2

FreePoolFunction · 0.50
AllocatePoolFunction · 0.50

Tested by

no test coverage detected