diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-07-24 17:12:51 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-07-24 17:12:51 -0700 |
commit | acd8349fe05dd9a7301c47994f5ed466127a192d (patch) | |
tree | 3f435d49c357baaa42ed13eb99d9fd593ee8d27b | |
parent | f5be24d4ed330859f7bfe23224338ec9458bf1ae (diff) | |
download | syslinux-acd8349fe05dd9a7301c47994f5ed466127a192d.tar.gz |
Move hidden_row to -2; don't re-timeout once a key is pressed
-rw-r--r-- | README.menu | 2 | ||||
-rw-r--r-- | com32/modules/menumain.c | 12 |
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; |