|
@@ -426,6 +426,7 @@ FastbootAppEntryPoint (
|
|
|
EFI_EVENT WaitEventArray[2];
|
|
|
UINTN EventIndex;
|
|
|
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;
|
|
|
+ EFI_INPUT_KEY Key;
|
|
|
|
|
|
mDataBuffer = NULL;
|
|
|
|
|
@@ -508,12 +509,21 @@ FastbootAppEntryPoint (
|
|
|
|
|
|
// Talk to the user
|
|
|
mTextOut->OutputString (mTextOut,
|
|
|
- L"Android Fastboot mode - version " ANDROID_FASTBOOT_VERSION ". Press any key to quit.\r\n");
|
|
|
+ L"Android Fastboot mode - version " ANDROID_FASTBOOT_VERSION ". Press RETURN or SPACE key to quit.\r\n");
|
|
|
|
|
|
// Quit when the user presses any key, or mFinishedEvent is signalled
|
|
|
WaitEventArray[0] = mFinishedEvent;
|
|
|
WaitEventArray[1] = TextIn->WaitForKey;
|
|
|
- gBS->WaitForEvent (2, WaitEventArray, &EventIndex);
|
|
|
+ while (1) {
|
|
|
+ gBS->WaitForEvent (2, WaitEventArray, &EventIndex);
|
|
|
+ Status = TextIn->ReadKeyStroke (gST->ConIn, &Key);
|
|
|
+ if (Key.ScanCode == SCAN_NULL) {
|
|
|
+ if ((Key.UnicodeChar == CHAR_CARRIAGE_RETURN) ||
|
|
|
+ (Key.UnicodeChar == L' ')) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
mTransport->Stop ();
|
|
|
if (EFI_ERROR (Status)) {
|