summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ross <midgey@rockbox.org>2007-04-03 20:22:04 +0000
committerTom Ross <midgey@rockbox.org>2007-04-03 20:22:04 +0000
commit70101c6027b58e27a4aeaa6ab9901080b8fd192b (patch)
tree200c9412e784d733361dcdd97daebd6881f1a09c
parentf4c6560ea7778cbc1ba0ea14e5fd6b4964225a85 (diff)
downloadrockbox-70101c6027b58e27a4aeaa6ab9901080b8fd192b.tar.gz
rockbox-70101c6027b58e27a4aeaa6ab9901080b8fd192b.zip
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.c17
-rw-r--r--apps/plugins/wormlet.c2
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)
624 624
625static int chopMenu(int menunum) 625static int chopMenu(int menunum)
626{ 626{
627 int m;
628 int result; 627 int result;
629 int res = 0; 628 int res = 0;
630 bool menu_quit = false; 629 bool menu_quit = false;
631 630
632 static const struct menu_item items[] = {
633 { "Start New Game", NULL },
634 { "Resume Game", NULL },
635 { "Level", NULL },
636 { "Quit", NULL },
637 };
638
639 static const struct opt_items levels[2] = { 631 static const struct opt_items levels[2] = {
640 { "Normal", -1 }, 632 { "Normal", -1 },
641 { "Steep", -1 }, 633 { "Steep", -1 },
642 }; 634 };
635
636 MENUITEM_STRINGLIST(menu,"Chopper Menu",NULL,"Start New Game","Resume Game",
637 "Level","Quit");
643 638
644#ifdef HAVE_LCD_COLOR 639#ifdef HAVE_LCD_COLOR
645 rb->lcd_set_foreground(LCD_WHITE); 640 rb->lcd_set_foreground(LCD_WHITE);
@@ -651,11 +646,8 @@ static int chopMenu(int menunum)
651 646
652 rb->lcd_clear_display(); 647 rb->lcd_clear_display();
653 648
654 m = rb->menu_init(items, sizeof(items) / sizeof(*items),
655 NULL, NULL, NULL, NULL);
656
657 while (!menu_quit) { 649 while (!menu_quit) {
658 result=rb->menu_show(m); 650 result=rb->do_menu(&menu,&result);
659 switch (result) 651 switch (result)
660 { 652 {
661 case 0: /* Start New Game */ 653 case 0: /* Start New Game */
@@ -685,7 +677,6 @@ static int chopMenu(int menunum)
685 } 677 }
686 } 678 }
687 rb->lcd_clear_display(); 679 rb->lcd_clear_display();
688 rb->menu_exit(m);
689 return res; 680 return res;
690} 681}
691 682
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)
2634 } 2634 }
2635 } 2635 }
2636 2636
2637 rb->menu_exit(m);
2638
2639 configfile_save(SETTINGS_FILENAME, config, 2637 configfile_save(SETTINGS_FILENAME, config,
2640 sizeof(config)/sizeof(*config), 2638 sizeof(config)/sizeof(*config),
2641 SETTINGS_VERSION); 2639 SETTINGS_VERSION);