diff options
author | Tom Ross <midgey@rockbox.org> | 2007-04-03 20:22:04 +0000 |
---|---|---|
committer | Tom Ross <midgey@rockbox.org> | 2007-04-03 20:22:04 +0000 |
commit | 70101c6027b58e27a4aeaa6ab9901080b8fd192b (patch) | |
tree | 200c9412e784d733361dcdd97daebd6881f1a09c | |
parent | f4c6560ea7778cbc1ba0ea14e5fd6b4964225a85 (diff) |
Adjust Chopper and fix my warning from Wormlet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13011 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/chopper.c | 17 | ||||
-rw-r--r-- | apps/plugins/wormlet.c | 2 |
2 files changed, 4 insertions, 15 deletions
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 1c3d7a765c..89f6e3db13 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c @@ -624,22 +624,17 @@ static void chopDrawScene(void) static int chopMenu(int menunum) { - int m; int result; int res = 0; bool menu_quit = false; - static const struct menu_item items[] = { - { "Start New Game", NULL }, - { "Resume Game", NULL }, - { "Level", NULL }, - { "Quit", NULL }, - }; - static const struct opt_items levels[2] = { { "Normal", -1 }, { "Steep", -1 }, }; + + MENUITEM_STRINGLIST(menu,"Chopper Menu",NULL,"Start New Game","Resume Game", + "Level","Quit"); #ifdef HAVE_LCD_COLOR rb->lcd_set_foreground(LCD_WHITE); @@ -651,11 +646,8 @@ static int chopMenu(int menunum) rb->lcd_clear_display(); - m = rb->menu_init(items, sizeof(items) / sizeof(*items), - NULL, NULL, NULL, NULL); - while (!menu_quit) { - result=rb->menu_show(m); + result=rb->do_menu(&menu,&result); switch (result) { case 0: /* Start New Game */ @@ -685,7 +677,6 @@ static int chopMenu(int menunum) } } rb->lcd_clear_display(); - rb->menu_exit(m); return res; } diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 3147134bca..d2f338fffa 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -2634,8 +2634,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) } } - rb->menu_exit(m); - configfile_save(SETTINGS_FILENAME, config, sizeof(config)/sizeof(*config), SETTINGS_VERSION); |