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;
/* Otherwise display the menu now; the timeout has already been
cancelled, since the user pressed a key. */
hiddenmenu = 0;
- timeout = 0;
+ key_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;