From deea274ddd642adb84eb7526e426bfee02a15250 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 2 Apr 2022 15:11:47 +0300 Subject: main: add main-loop stub --- UefiMonitorTest/UefiMonitorTest.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'UefiMonitorTest') diff --git a/UefiMonitorTest/UefiMonitorTest.c b/UefiMonitorTest/UefiMonitorTest.c index 708bf2d..947a294 100644 --- a/UefiMonitorTest/UefiMonitorTest.c +++ b/UefiMonitorTest/UefiMonitorTest.c @@ -194,6 +194,26 @@ GetGraphicsOutputProtocol ( return Gop; } +STATIC +EFI_STATUS +Run ( + IN GRAPHICS_CONTEXT *Graphics + ) +{ + BOOLEAN Running; + + Running = TRUE; + + while (Running == TRUE) + { + // Buffer swap: + CopyMem (Graphics->FrontBuffer, Graphics->BackBuffer, Graphics->BufferSize); + Running = FALSE; + } + + return EFI_SUCCESS; +} + EFI_STATUS EFIAPI UefiMain ( @@ -203,6 +223,9 @@ UefiMain ( { EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop; GRAPHICS_CONTEXT Graphics; + EFI_STATUS Status; + + Status = EFI_SUCCESS; Gop = GetGraphicsOutputProtocol (); if (Gop == NULL) { @@ -212,9 +235,9 @@ UefiMain ( PrepareGraphicsInfo (&Graphics, Gop); - + Status = Run (&Graphics); ForgetGraphicsInfo (&Graphics); - return EFI_SUCCESS; + return Status; } -- cgit v1.2.3-18-g5258