aboutsummaryrefslogtreecommitdiffstats
path: root/UefiMonitorTest/UefiMonitorTest.c
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2022-04-25 15:58:05 +0300
committerJoursoir <chat@joursoir.net>2022-04-25 15:58:05 +0300
commit7b7d487c9e30fc4a9480209d4b37aa29b7a61ddd (patch)
treed4053a1ad66e71fd25c1c3decc5ab81eebec6012 /UefiMonitorTest/UefiMonitorTest.c
parentfb21722ed2dde51ca04d95e86f44d159673fff2d (diff)
downloadumt-7b7d487c9e30fc4a9480209d4b37aa29b7a61ddd.tar.gz
umt-7b7d487c9e30fc4a9480209d4b37aa29b7a61ddd.tar.bz2
umt-7b7d487c9e30fc4a9480209d4b37aa29b7a61ddd.zip
implement application context
Diffstat (limited to 'UefiMonitorTest/UefiMonitorTest.c')
-rw-r--r--UefiMonitorTest/UefiMonitorTest.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/UefiMonitorTest/UefiMonitorTest.c b/UefiMonitorTest/UefiMonitorTest.c
index 09923a1..1ac26e2 100644
--- a/UefiMonitorTest/UefiMonitorTest.c
+++ b/UefiMonitorTest/UefiMonitorTest.c
@@ -7,6 +7,9 @@
#include "UefiMonitorTest.h"
+STATIC CONST UMT_STATE_ACTIONS mStateActions[UMT_STATE_END] = {
+ { NULL, NULL, NULL, NULL, NULL }
+};
STATIC
EFI_GRAPHICS_OUTPUT_PROTOCOL *
@@ -53,15 +56,21 @@ Run (
IN GRAPHICS_CONTEXT *Graphics
)
{
- BOOLEAN Running;
+ UMT_CONTEXT Ctx;
- Running = TRUE;
+ Ctx.State = UMT_STATE_MAIN_MENU;
+ Ctx.Running = TRUE;
+ Ctx.ShowTip = FALSE;
+ Ctx.Actions = &mStateActions[Ctx.State];
+ Ctx.Graphics = Graphics;
+ Ctx.Actions->Init (&Ctx);
- while (Running == TRUE)
+ while (Ctx.Running == TRUE)
{
+ Ctx.Actions->Doit (&Ctx);
+
// Buffer swap:
CopyMem (Graphics->FrontBuffer, Graphics->BackBuffer, Graphics->BufferSize);
- Running = FALSE;
}
return EFI_SUCCESS;