From c29317767429d06f3885375605e78adc127be495 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sun, 12 Dec 2021 19:06:15 +0300 Subject: actions: add macro for the unactive panel --- Library/UefiShellUfmCommandLib/actions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Library/UefiShellUfmCommandLib/actions.c') diff --git a/Library/UefiShellUfmCommandLib/actions.c b/Library/UefiShellUfmCommandLib/actions.c index 174eb3e..fb86874 100644 --- a/Library/UefiShellUfmCommandLib/actions.c +++ b/Library/UefiShellUfmCommandLib/actions.c @@ -20,6 +20,7 @@ #define PANEL (fm_ctx.curpanel) #define LEFT_PANEL (fm_ctx.left) #define RIGHT_PANEL (fm_ctx.right) +#define UPANEL ((PANEL == LEFT_PANEL) ? RIGHT_PANEL : LEFT_PANEL) STATIC CONST CHAR16 mkdir_title[] = L" Create a new directory "; STATIC CONST CHAR16 mkdir_label[] = L"Enter directory name:"; @@ -61,7 +62,7 @@ BOOLEAN jump_down(VOID) BOOLEAN change_panel(VOID) { panel_set_active(PANEL, FALSE); - PANEL = (PANEL == LEFT_PANEL) ? RIGHT_PANEL : LEFT_PANEL; + PANEL = UPANEL; panel_set_active(PANEL, TRUE); return TRUE; } -- cgit v1.2.3-18-g5258