diff --git a/xtldr/includes/xtldr.h b/xtldr/includes/xtldr.h index ea52a22..38fd516 100644 --- a/xtldr/includes/xtldr.h +++ b/xtldr/includes/xtldr.h @@ -358,6 +358,10 @@ EFI_STATUS BlpParseConfigFile(IN CONST PCHAR RawConfig, OUT PLIST_ENTRY Configuration); +XTCDECL +VOID +BlpPrintShellPrompt(); + XTCDECL EFI_STATUS BlpReadConfigFile(IN CONST PWCHAR ConfigDirectory, diff --git a/xtldr/shell.c b/xtldr/shell.c index 5f51cd4..a9d58b7 100644 --- a/xtldr/shell.c +++ b/xtldr/shell.c @@ -13,12 +13,24 @@ XTCDECL VOID BlStartLoaderShell() { - /* Clear screen and enable cursor */ - BlSetConsoleAttributes(EFI_TEXT_BGCOLOR_BLACK | EFI_TEXT_FGCOLOR_LIGHTGRAY); - BlClearConsoleScreen(); - BlEnableConsoleCursor(); + /* Initialize console */ + BlInitializeConsole(); + + /* Print prompt */ + BlpPrintShellPrompt(); + for(;;); +} + +XTCDECL +VOID +BlpPrintShellPrompt() +{ + /* Set prompt color */ + BlSetConsoleAttributes(EFI_TEXT_BGCOLOR_BLACK | EFI_TEXT_FGCOLOR_YELLOW); /* Print prompt */ BlConsolePrint(L"XTLDR> "); - for(;;); + + /* Reset standard shell colors */ + BlSetConsoleAttributes(EFI_TEXT_BGCOLOR_BLACK | EFI_TEXT_FGCOLOR_LIGHTGRAY); }