summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-07-24 17:12:51 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-07-24 17:12:51 -0700
commitacd8349fe05dd9a7301c47994f5ed466127a192d (patch)
tree3f435d49c357baaa42ed13eb99d9fd593ee8d27b
parentf5be24d4ed330859f7bfe23224338ec9458bf1ae (diff)
downloadsyslinux-acd8349fe05dd9a7301c47994f5ed466127a192d.tar.gz
Move hidden_row to -2; don't re-timeout once a key is pressed
-rw-r--r--README.menu2
-rw-r--r--com32/modules/menumain.c12
2 files changed, 8 insertions, 6 deletions
diff --git a/README.menu b/README.menu
index cf5882d0..d9a156cc 100644
--- a/README.menu
+++ b/README.menu
@@ -286,7 +286,7 @@ MENU PASSWORDROW 11
MENU TIMEOUTROW 20
MENU HELPMSGROW 22
MENU HELPMSGENDROW -1
-MENU HIDDENROW 20
+MENU HIDDENROW -2
MENU HSHIFT 0
MENU VSHIFT 0
diff --git a/com32/modules/menumain.c b/com32/modules/menumain.c
index e75223fb..42826462 100644
--- a/com32/modules/menumain.c
+++ b/com32/modules/menumain.c
@@ -93,7 +93,7 @@ struct menu_parameter mparm[] = {
{ "helpmsgendrow", -1 },
{ "hshift", 0 },
{ "vshift", 0 },
- { "hiddenrow", 20 },
+ { "hiddenrow", -2 },
{ NULL, 0 }
};
@@ -793,9 +793,6 @@ run_menu(void)
const char *cmdline = NULL;
volatile clock_t key_timeout, timeout_left, this_timeout;
- /* Note: for both key_timeout and timeout == 0 means no limit */
- timeout_left = key_timeout = timeout;
-
/* If we're in shiftkey mode, exit immediately unless a shift key is pressed */
if ( shiftkey && !shift_is_held() ) {
return menu_entries[defentry].cmdline;
@@ -807,10 +804,15 @@ run_menu(void)
if (cmdline)
return cmdline;
- /* Otherwise display the menu now */
+ /* Otherwise display the menu now; the timeout has already been
+ cancelled, since the user pressed a key. */
hiddenmenu = 0;
+ timeout = 0;
}
+ /* Note: for both key_timeout and timeout == 0 means no limit */
+ timeout_left = key_timeout = timeout;
+
/* Handle both local and global timeout */
if ( setjmp(timeout_jump) ) {
entry = defentry;