Implement BlClearConsoleLine() routine
This commit is contained in:
@@ -9,6 +9,34 @@
|
||||
#include <xtldr.h>
|
||||
|
||||
|
||||
/**
|
||||
* Clears a specified line on the UEFI text console.
|
||||
*
|
||||
* @param LineNo
|
||||
* Supplies a line number to clear.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTCDECL
|
||||
VOID
|
||||
BlClearConsoleLine(IN ULONGLONG LineNo)
|
||||
{
|
||||
UINT_PTR Index, ResX, ResY;
|
||||
|
||||
/* Query console mode */
|
||||
BlQueryConsoleMode(&ResX, &ResY);
|
||||
|
||||
/* Set cursor position and clear line */
|
||||
BlSetCursorPosition(0, LineNo);
|
||||
for(Index = 0; Index < ResX; Index++)
|
||||
{
|
||||
/* Clear line */
|
||||
BlConsoleWrite(L" ");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine clears the UEFI console screen.
|
||||
*
|
||||
|
@@ -16,6 +16,10 @@
|
||||
typedef VOID (BMPRINTCHAR)(IN USHORT Character);
|
||||
|
||||
/* XTLDR routines forward references */
|
||||
XTCDECL
|
||||
VOID
|
||||
BlClearConsoleLine(IN ULONGLONG LineNo);
|
||||
|
||||
XTCDECL
|
||||
VOID
|
||||
BlClearConsoleScreen();
|
||||
|
@@ -90,6 +90,7 @@ BlpRegisterXtLoaderProtocol()
|
||||
EFI_HANDLE Handle = NULL;
|
||||
|
||||
/* Set all routines available via loader protocol */
|
||||
LdrProtocol.Console.ClearLine = BlClearConsoleLine;
|
||||
LdrProtocol.Console.ClearScreen = BlClearConsoleScreen;
|
||||
LdrProtocol.Console.DisableCursor = BlDisableConsoleCursor;
|
||||
LdrProtocol.Console.EnableCursor = BlEnableConsoleCursor;
|
||||
|
Reference in New Issue
Block a user