diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-06-16 04:25:21 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-06-16 04:25:21 +0000 |
commit | af9f4056510f248c4c9c1335167853bb455e8cc0 (patch) | |
tree | eff7ad7726083ee605d753bd9aa9e22213b1acf0 /apps/plugins/pacbox/pacbox.c | |
parent | cb57a568e8dc9def607dc9ab27f515309bd13841 (diff) | |
download | rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.gz rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.zip |
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
Diffstat (limited to 'apps/plugins/pacbox/pacbox.c')
-rw-r--r-- | apps/plugins/pacbox/pacbox.c | 22 |
1 files changed, 5 insertions, 17 deletions
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 @@ | |||
29 | #include "pacbox.h" | 29 | #include "pacbox.h" |
30 | #include "pacbox_lcd.h" | 30 | #include "pacbox_lcd.h" |
31 | #include "lib/configfile.h" | 31 | #include "lib/configfile.h" |
32 | #include "lib/oldmenuapi.h" | ||
33 | 32 | ||
34 | PLUGIN_HEADER | 33 | PLUGIN_HEADER |
35 | PLUGIN_IRAM_DECLARE | 34 | PLUGIN_IRAM_DECLARE |
@@ -138,7 +137,7 @@ static int settings_to_dip(struct pacman_settings settings) | |||
138 | 137 | ||
139 | static bool pacbox_menu(void) | 138 | static bool pacbox_menu(void) |
140 | { | 139 | { |
141 | int m; | 140 | int selected=0; |
142 | int result; | 141 | int result; |
143 | int menu_quit=0; | 142 | int menu_quit=0; |
144 | int new_setting; | 143 | int new_setting; |
@@ -173,23 +172,14 @@ static bool pacbox_menu(void) | |||
173 | { "Alternate", -1 }, | 172 | { "Alternate", -1 }, |
174 | }; | 173 | }; |
175 | 174 | ||
176 | static const struct menu_item items[] = { | 175 | MENUITEM_STRINGLIST(menu, "Pacbox Menu", NULL, |
177 | { "Difficulty", NULL }, | 176 | "Difficulty", "Pacmen Per Game", "Bonus Life", |
178 | { "Pacmen Per Game", NULL }, | 177 | "Ghost Names", "Display FPS", "Restart", "Quit"); |
179 | { "Bonus Life", NULL }, | ||
180 | { "Ghost Names", NULL }, | ||
181 | { "Display FPS", NULL }, | ||
182 | { "Restart", NULL }, | ||
183 | { "Quit", NULL }, | ||
184 | }; | ||
185 | |||
186 | m = menu_init(items, sizeof(items) / sizeof(*items), | ||
187 | NULL, NULL, NULL, NULL); | ||
188 | 178 | ||
189 | rb->button_clear_queue(); | 179 | rb->button_clear_queue(); |
190 | 180 | ||
191 | while (!menu_quit) { | 181 | while (!menu_quit) { |
192 | result=menu_show(m); | 182 | result=rb->do_menu(&menu, &selected, NULL, false); |
193 | 183 | ||
194 | switch(result) | 184 | switch(result) |
195 | { | 185 | { |
@@ -243,8 +233,6 @@ static bool pacbox_menu(void) | |||
243 | } | 233 | } |
244 | } | 234 | } |
245 | 235 | ||
246 | menu_exit(m); | ||
247 | |||
248 | if (need_restart) { | 236 | if (need_restart) { |
249 | init_PacmanMachine(settings_to_dip(settings)); | 237 | init_PacmanMachine(settings_to_dip(settings)); |
250 | } | 238 | } |