aboutsummaryrefslogtreecommitdiffstats
path: root/UefiMonitorTest
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2022-04-02 15:11:47 +0300
committerJoursoir <chat@joursoir.net>2022-04-02 15:11:47 +0300
commitdeea274ddd642adb84eb7526e426bfee02a15250 (patch)
tree8e2a54696d39b2d03da7c2f76282ae3b51e43162 /UefiMonitorTest
parent5da1d9b2fa0e2598cb4024a907145b8eb7a0368a (diff)
downloadumt-deea274ddd642adb84eb7526e426bfee02a15250.tar.gz
umt-deea274ddd642adb84eb7526e426bfee02a15250.tar.bz2
umt-deea274ddd642adb84eb7526e426bfee02a15250.zip
main: add main-loop stub
Diffstat (limited to 'UefiMonitorTest')
-rw-r--r--UefiMonitorTest/UefiMonitorTest.c27
1 files changed, 25 insertions, 2 deletions
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;
}