Implement BlConsoleQueryMode() and BlSetCursorPosition()
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 26s
Builds / ExectOS (i686) (push) Successful in 27s

This commit is contained in:
2023-12-11 17:37:37 +01:00
parent 02cc0cd522
commit 9aa2efe17f
4 changed files with 59 additions and 1 deletions

View File

@@ -93,6 +93,48 @@ BlConsolePrint(IN PUINT16 Format,
VA_END(Arguments);
}
/**
* Queries information concerning the output devices supported text mode.
*
* @param ResX
* Supplies a buffer to receive the horizontal resolution.
*
* @param ResY
* Supplies a buffer to receive the vertical resolution.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlConsoleQueryMode(OUT PUINT_PTR ResX,
OUT PUINT_PTR ResY)
{
EfiSystemTable->ConOut->QueryMode(EfiSystemTable->ConOut, EfiSystemTable->ConOut->Mode->Mode, ResX, ResY);
}
/**
* Sets new coordinates of the console cursor position.
*
* @param PosX
* Specifies the new X coordinate of the cursor.
*
* @param PosY
* Specifies the new Y coordinate of the cursor.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlSetCursorPosition(IN ULONGLONG PosX,
IN ULONGLONG PosY)
{
EfiSystemTable->ConOut->SetCursorPosition(EfiSystemTable->ConOut, PosX, PosY);
}
/**
* Displays the string on the device at the current cursor location.
*

View File

@@ -37,6 +37,11 @@ VOID
BlConsolePrint(IN PUINT16 Format,
IN ...);
XTCDECL
VOID
BlConsoleQueryMode(OUT PUINT_PTR ResX,
OUT PUINT_PTR ResY);
XTCDECL
VOID
BlConsoleWrite(IN PUSHORT String);
@@ -113,6 +118,11 @@ EFI_STATUS
BlSetConfigValue(IN CONST PWCHAR ConfigName,
IN CONST PWCHAR ConfigValue);
XTCDECL
VOID
BlSetCursorPosition(IN ULONGLONG PosX,
IN ULONGLONG PosY);
XTCDECL
VOID
BlSleepExecution(IN ULONG_PTR Milliseconds);

View File

@@ -94,6 +94,8 @@ BlpRegisterXtLoaderProtocol()
LdrProtocol.Console.DisableCursor = BlConsoleDisableCursor;
LdrProtocol.Console.EnableCursor = BlConsoleEnableCursor;
LdrProtocol.Console.Print = BlConsolePrint;
LdrProtocol.Console.QueryMode = BlConsoleQueryMode;
LdrProtocol.Console.SetCursorPosition = BlSetCursorPosition;
LdrProtocol.Console.Write = BlConsoleWrite;
LdrProtocol.Debug.Print = BlDebugPrint;
LdrProtocol.Disk.CloseVolume = BlCloseVolume;