[syslinux] Menu system bug - MENU DEFAULT not working
Matt Fleming
matt at console-pimps.org
Thu Oct 11 03:50:05 PDT 2012
On Wed, 2012-10-10 at 21:54 +0200, Tomas M wrote:
> Actually the config provided, even if it looks difficult, is the
> simplest config to cover all possible options and cursor positions for
> the generated menus.
OK, I think I see what's going on now. You're correct that the jumping
around issue is caused by the menu code. It's because each menu/submenu
"remembers" the last selected entry and the default entry only applies
the first time you visit a menu/submenu.
Try apply this patch ontop of the one I sent the other day and see if
the behaviour is more like what you were expecting,
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c
index 7c58979..db81346 100644
--- a/com32/menu/menumain.c
+++ b/com32/menu/menumain.c
@@ -915,7 +915,7 @@ static const char *run_menu(void)
done = 0;
clear = 2;
cm = me->submenu;
- entry = cm->curentry;
+ entry = cm->defentry;
top = cm->curtop;
break;
case MA_QUIT:
The problem is that this patch by itself is likely to break backwards
compatibility, as I'm sure people will be relying upon menu/submenus
remembering the last selected entry.
Could you fix this in your menu-generation tool?
--
Matt Fleming, Intel Open Source Technology Center
More information about the Syslinux
mailing list