Add ReadKey to wait and actually read a key

This commit is contained in:
Lauri Kenttä
2016-05-14 11:32:54 +03:00
parent 31323a5111
commit 8ed61047dd
2 changed files with 15 additions and 1 deletions

View File

@@ -82,6 +82,13 @@ void WaitKey(void) {
WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
}
EFI_INPUT_KEY ReadKey(void) {
WaitKey();
EFI_INPUT_KEY key = {0};
ST->ConIn->ReadKeyStroke(ST->ConIn, &key);
return key;
}
void* LoadFileWithPadding(EFI_FILE_HANDLE dir, const CHAR16* path, UINTN* size_ptr, UINTN padding) {
EFI_STATUS e;
EFI_FILE_HANDLE handle;