diff options
-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 { |