mirror of
https://github.com/Metabolix/HackBGRT.git
synced 2026-09-28 15:01:21 -07: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);
|
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) {
|
void* LoadFileWithPadding(EFI_FILE_HANDLE dir, const CHAR16* path, UINTN* size_ptr, UINTN padding) {
|
||||||
EFI_STATUS e;
|
EFI_STATUS e;
|
||||||
EFI_FILE_HANDLE handle;
|
EFI_FILE_HANDLE handle;
|
||||||
|
|||||||
+8
-1
@@ -83,10 +83,17 @@ extern void RandomSeed(UINT64 a, UINT64 b);
|
|||||||
extern void RandomSeedAuto(void);
|
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);
|
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.
|
* Load a file, allocate some extra bytes as well.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user