diff options
author | Joursoir <chat@joursoir.net> | 2022-04-24 19:30:43 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2022-04-24 19:31:08 +0300 |
commit | c878c061227017e98014f847a0b413026b596999 (patch) | |
tree | 371340fb96eaaf30eb045ef3f77598a925639d2f | |
parent | 87e0417eaf431d0d1bab9537bd9a9ed33c91e5d3 (diff) | |
download | umt-c878c061227017e98014f847a0b413026b596999.tar.gz umt-c878c061227017e98014f847a0b413026b596999.tar.bz2 umt-c878c061227017e98014f847a0b413026b596999.zip |
main: add a keyboard context to a graphics context
-rw-r--r-- | UefiMonitorTest/UefiMonitorTest.c | 11 | ||||
-rw-r--r-- | UefiMonitorTest/UefiMonitorTest.h | 4 | ||||
-rw-r--r-- | UefiMonitorTest/UefiMonitorTest.inf | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/UefiMonitorTest/UefiMonitorTest.c b/UefiMonitorTest/UefiMonitorTest.c index 92e5799..679eed9 100644 --- a/UefiMonitorTest/UefiMonitorTest.c +++ b/UefiMonitorTest/UefiMonitorTest.c @@ -193,6 +193,17 @@ PrepareGraphicsInfo ( Graphics->PixelWidth = PixelWidth; Graphics->Pitch = Gop->Mode->Info->PixelsPerScanLine; + // Find TextInEx in System Table ConsoleInHandle + Status = gBS->HandleProtocol ( + gST->ConsoleInHandle, + &gEfiSimpleTextInputExProtocolGuid, + (VOID **)&Graphics->TextInputEx + ); + if (EFI_ERROR (Status)) { + FreePool (Graphics->BackBuffer); + return Status; + } + // Find mouse in System Table ConsoleInHandle Status = gBS->HandleProtocol ( gST->ConsoleInHandle, diff --git a/UefiMonitorTest/UefiMonitorTest.h b/UefiMonitorTest/UefiMonitorTest.h index 3f82246..7b07c31 100644 --- a/UefiMonitorTest/UefiMonitorTest.h +++ b/UefiMonitorTest/UefiMonitorTest.h @@ -57,6 +57,10 @@ typedef struct { /// UINT32 Pitch; // + // The EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. + // + EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInputEx; + // // A mouse support. // BOOLEAN MouseSupported; diff --git a/UefiMonitorTest/UefiMonitorTest.inf b/UefiMonitorTest/UefiMonitorTest.inf index 7eb27cc..e0e7c13 100644 --- a/UefiMonitorTest/UefiMonitorTest.inf +++ b/UefiMonitorTest/UefiMonitorTest.inf @@ -26,6 +26,7 @@ [Protocols] gEfiSimplePointerProtocolGuid + gEfiSimpleTextInputExProtocolGuid [FeaturePcd] |