[haiku-commits] Change in haiku[master]: UEFI Console, easier spacebar for bootmenu

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 31 Jan 2021 20:46:24 +0000

From Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>:

Fredrik Holmqvist has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/3725 ;)


Change subject: UEFI Console, easier spacebar for bootmenu
......................................................................

UEFI Console, easier spacebar for bootmenu
---
M src/system/boot/platform/efi/console.cpp
1 file changed, 10 insertions(+), 11 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/25/3725/1

diff --git a/src/system/boot/platform/efi/console.cpp 
b/src/system/boot/platform/efi/console.cpp
index f83428b..f14d801 100644
--- a/src/system/boot/platform/efi/console.cpp
+++ b/src/system/boot/platform/efi/console.cpp
@@ -268,22 +268,21 @@
 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);
+       for (int i = 0; i < 3; i++) {
+               // give the user a chance to press a key
+               kBootServices->Stall(100000);

-       status = kSystemTable->ConIn->ReadKeyStroke(kSystemTable->ConIn, &key);
+               efi_status status = 
kSystemTable->ConIn->ReadKeyStroke(kSystemTable->ConIn, &key);
 
-       if (status != EFI_SUCCESS)
-               return 0;
+               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;
-
+               if (key.UnicodeChar == 0 && key.ScanCode == SCAN_ESC)
+                       return BOOT_OPTION_DEBUG_OUTPUT;
+               if (key.UnicodeChar == ' ')
+                       return BOOT_OPTION_MENU;
+       }
        return 0;
 }


--
To view, visit https://review.haiku-os.org/c/haiku/+/3725
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Idf68b738168fbb59d000c1f0f0771c8351bc70ab
Gerrit-Change-Number: 3725
Gerrit-PatchSet: 1
Gerrit-Owner: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: UEFI Console, easier spacebar for bootmenu - Gerrit