mirror of
https://github.com/Metabolix/HackBGRT.git
synced 2025-12-06 17:15:42 -08:00
Add ReadKey to wait and actually read a key
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -83,10 +83,17 @@ extern void RandomSeed(UINT64 a, UINT64 b);
|
||||
extern void RandomSeedAuto(void);
|
||||
|
||||
/**
|
||||
* Wait for a key press.
|
||||
* Wait for a key press. It will still remain in the buffer.
|
||||
*/
|
||||
extern void WaitKey(void);
|
||||
|
||||
/**
|
||||
* Wait for a key press and read it.
|
||||
*
|
||||
* @return The pressed key.
|
||||
*/
|
||||
extern EFI_INPUT_KEY ReadKey(void);
|
||||
|
||||
/**
|
||||
* Load a file, allocate some extra bytes as well.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user