diff options
author | Joursoir <chat@joursoir.net> | 2022-05-04 20:22:45 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2022-05-04 20:22:45 +0300 |
commit | 0127500438ea934128595daea542605e25db1583 (patch) | |
tree | b5d0753248e5260265ccae83f2964cf2c92c3164 /UefiMonitorTest | |
parent | b64358b2306e1599f240a749dc0c5cc96694e25b (diff) | |
download | umt-0127500438ea934128595daea542605e25db1583.tar.gz umt-0127500438ea934128595daea542605e25db1583.tar.bz2 umt-0127500438ea934128595daea542605e25db1583.zip |
combine 2 state actions API callbacks into 1
Diffstat (limited to 'UefiMonitorTest')
-rw-r--r-- | UefiMonitorTest/MainMenu.c | 15 | ||||
-rw-r--r-- | UefiMonitorTest/MainMenu.h | 10 | ||||
-rw-r--r-- | UefiMonitorTest/UefiMonitorTest.c | 6 | ||||
-rw-r--r-- | UefiMonitorTest/UefiMonitorTest.h | 4 |
4 files changed, 11 insertions, 24 deletions
diff --git a/UefiMonitorTest/MainMenu.c b/UefiMonitorTest/MainMenu.c index c271e0d..85c9e64 100644 --- a/UefiMonitorTest/MainMenu.c +++ b/UefiMonitorTest/MainMenu.c @@ -87,17 +87,10 @@ MainMenuTip ( } VOID -MainMenuKeyRight ( - IN UMT_CONTEXT *Ctx - ) -{ - -} - -VOID -MainMenuKeyLeft ( - IN UMT_CONTEXT *Ctx +MainMenuChangeValue ( + IN UMT_CONTEXT *Ctx, + IN INT8 ValueStep ) { - + } diff --git a/UefiMonitorTest/MainMenu.h b/UefiMonitorTest/MainMenu.h index 33d7813..0b97250 100644 --- a/UefiMonitorTest/MainMenu.h +++ b/UefiMonitorTest/MainMenu.h @@ -19,13 +19,9 @@ MainMenuTip ( ); VOID -MainMenuKeyRight ( - IN UMT_CONTEXT *Ctx - ); - -VOID -MainMenuKeyLeft ( - IN UMT_CONTEXT *Ctx +MainMenuChangeValue ( + IN UMT_CONTEXT *Ctx, + IN INT8 ValueStep ); #endif /* UMT_MAIN_MENU_H */ diff --git a/UefiMonitorTest/UefiMonitorTest.c b/UefiMonitorTest/UefiMonitorTest.c index 44b9ae6..c7034f0 100644 --- a/UefiMonitorTest/UefiMonitorTest.c +++ b/UefiMonitorTest/UefiMonitorTest.c @@ -12,7 +12,7 @@ #include "MainMenu.h" STATIC CONST UMT_STATE_ACTIONS mStateActions[UMT_STATE_END] = { - { MainMenuInit, MainMenuDoit, MainMenuTip, MainMenuKeyRight, MainMenuKeyLeft } + { MainMenuInit, MainMenuDoit, MainMenuTip, MainMenuChangeValue } }; EFI_HII_HANDLE gUmtHiiHandle = NULL; @@ -152,11 +152,11 @@ HandleInput ( break; case SCAN_RIGHT: - Ctx->Actions->KeyRight (Ctx); + Ctx->Actions->ChangeValue (Ctx, +1); break; case SCAN_LEFT: - Ctx->Actions->KeyLeft (Ctx); + Ctx->Actions->ChangeValue (Ctx, -1); break; case SCAN_F1...SCAN_F11: diff --git a/UefiMonitorTest/UefiMonitorTest.h b/UefiMonitorTest/UefiMonitorTest.h index e845d68..0138bce 100644 --- a/UefiMonitorTest/UefiMonitorTest.h +++ b/UefiMonitorTest/UefiMonitorTest.h @@ -12,9 +12,7 @@ typedef struct { VOID (*Init)(UMT_CONTEXT *); VOID (*Doit)(UMT_CONTEXT *); VOID (*Tip)(UMT_CONTEXT *); - - VOID (*KeyRight)(UMT_CONTEXT *); - VOID (*KeyLeft)(UMT_CONTEXT *); + VOID (*ChangeValue)(UMT_CONTEXT *, INT8); } UMT_STATE_ACTIONS; enum UMT_STATE { |