From af9f4056510f248c4c9c1335167853bb455e8cc0 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 16 Jun 2009 04:25:21 +0000 Subject: Accept FS#10094 by Teruaki Kawashima: Replace the old menu API with the "new" one (a very long time overdue so huge thanks for the work.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21306 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/pacbox/pacbox.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'apps/plugins/pacbox') diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c index 560e185704..e7b92c38cf 100644 --- a/apps/plugins/pacbox/pacbox.c +++ b/apps/plugins/pacbox/pacbox.c @@ -29,7 +29,6 @@ #include "pacbox.h" #include "pacbox_lcd.h" #include "lib/configfile.h" -#include "lib/oldmenuapi.h" PLUGIN_HEADER PLUGIN_IRAM_DECLARE @@ -138,7 +137,7 @@ static int settings_to_dip(struct pacman_settings settings) static bool pacbox_menu(void) { - int m; + int selected=0; int result; int menu_quit=0; int new_setting; @@ -173,23 +172,14 @@ static bool pacbox_menu(void) { "Alternate", -1 }, }; - static const struct menu_item items[] = { - { "Difficulty", NULL }, - { "Pacmen Per Game", NULL }, - { "Bonus Life", NULL }, - { "Ghost Names", NULL }, - { "Display FPS", NULL }, - { "Restart", NULL }, - { "Quit", NULL }, - }; - - m = menu_init(items, sizeof(items) / sizeof(*items), - NULL, NULL, NULL, NULL); + MENUITEM_STRINGLIST(menu, "Pacbox Menu", NULL, + "Difficulty", "Pacmen Per Game", "Bonus Life", + "Ghost Names", "Display FPS", "Restart", "Quit"); rb->button_clear_queue(); while (!menu_quit) { - result=menu_show(m); + result=rb->do_menu(&menu, &selected, NULL, false); switch(result) { @@ -243,8 +233,6 @@ static bool pacbox_menu(void) } } - menu_exit(m); - if (need_restart) { init_PacmanMachine(settings_to_dip(settings)); } -- cgit v1.2.3