hrev54941 adds 1 changeset to branch 'master'
old head: b08e283a2e6071a37ff7479210c83bacdc131dac
new head: f8157a3971dad18f798a1eab499a0640ac5b879f
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=f8157a3971da+%5Eb08e283a2e60
----------------------------------------------------------------------------
f8157a3971da: UEFI Console, easier spacebar for bootmenu
Change-Id: Idf68b738168fbb59d000c1f0f0771c8351bc70ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3725
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
[ Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev54941
Commit: f8157a3971dad18f798a1eab499a0640ac5b879f
URL: https://git.haiku-os.org/haiku/commit/?id=f8157a3971da
Author: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
Date: Sun Jan 31 20:44:48 2021 UTC
----------------------------------------------------------------------------
1 file changed, 12 insertions(+), 11 deletions(-)
src/system/boot/platform/efi/console.cpp | 23 ++++++++++++-----------
----------------------------------------------------------------------------
diff --git a/src/system/boot/platform/efi/console.cpp
b/src/system/boot/platform/efi/console.cpp
index 850cc15a1b..1c0fea642f 100644
--- a/src/system/boot/platform/efi/console.cpp
+++ b/src/system/boot/platform/efi/console.cpp
@@ -231,22 +231,23 @@ console_init(void)
uint32
console_check_boot_keys(void)
{
- efi_status status;
efi_input_key key;
- // give the user a chance to press a key
- kBootServices->Stall(500000);
-
- status = kSystemTable->ConIn->ReadKeyStroke(kSystemTable->ConIn, &key);
+ for (int i = 0; i < 3; i++) {
+ // give the user a chance to press a key
+ kBootServices->Stall(100000);
- if (status != EFI_SUCCESS)
- return 0;
+ efi_status status = kSystemTable->ConIn->ReadKeyStroke(
+ kSystemTable->ConIn, &key);
- if (key.UnicodeChar == 0 && key.ScanCode == SCAN_ESC)
- return BOOT_OPTION_DEBUG_OUTPUT;
- if (key.UnicodeChar == ' ')
- return BOOT_OPTION_MENU;
+ if (status != EFI_SUCCESS)
+ continue;
+ if (key.UnicodeChar == 0 && key.ScanCode == SCAN_ESC)
+ return BOOT_OPTION_DEBUG_OUTPUT;
+ if (key.UnicodeChar == ' ')
+ return BOOT_OPTION_MENU;
+ }
return 0;
}