Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions tool/dsxmenu/dsxmenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,12 @@ int run_menu(void) {
break;
}
else if (c == UPARROW) {
i = menu_sel;
if ((--menu_sel) < 0)
menu_sel = menu_items - 1;
i = menu_sel;
// This loops until a non __INFO__ menu item is found
do {
if ((--menu_sel) < 0)
menu_sel = menu_items - 1;
} while (!strcmp(menu[menu_sel].menu_item_name, "__INFO__"));

if (i != menu_sel) {
draw_menu_item(i);
Expand All @@ -719,8 +722,11 @@ int run_menu(void) {
}
else if (c == DNARROW) {
i = menu_sel;
if ((++menu_sel) >= menu_items)
menu_sel = 0;
// This loops until a non __INFO__ menu item is found
do {
if ((++menu_sel) >= menu_items)
menu_sel = 0;
} while (!strcmp(menu[menu_sel].menu_item_name, "__INFO__"));

if (i != menu_sel) {
draw_menu_item(i);
Expand Down
6 changes: 5 additions & 1 deletion tool/dsxmenu/example.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# example menu
[menu]
menumessage=Welcome to the Custom Boot Selector!
menuitem=__INFO__,--------------------------------------------------
menuitem=__INFO__,These __INFO__ lines cannot be selected or.
menuitem=__INFO__,highlighted, they are for adding little notes.
menuitem=__INFO__,--------------------------------------------------
menuitem=choice_a,Menu item A
menuitem=choice_b,Menu item B
menuitem=choice_c,Menu item C
Expand All @@ -24,4 +29,3 @@ echo Another choice B
# NTS: Unlike MS-DOS, these are autoexec.bat like commands
echo Choice C
echo Another choice C