forked from len0rd/rockbox
Adjust Chopper and fix my warning from Wormlet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13011 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f4c6560ea7
commit
70101c6027
2 changed files with 4 additions and 15 deletions
|
@ -624,23 +624,18 @@ static void chopDrawScene(void)
|
||||||
|
|
||||||
static int chopMenu(int menunum)
|
static int chopMenu(int menunum)
|
||||||
{
|
{
|
||||||
int m;
|
|
||||||
int result;
|
int result;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
bool menu_quit = false;
|
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] = {
|
static const struct opt_items levels[2] = {
|
||||||
{ "Normal", -1 },
|
{ "Normal", -1 },
|
||||||
{ "Steep", -1 },
|
{ "Steep", -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MENUITEM_STRINGLIST(menu,"Chopper Menu",NULL,"Start New Game","Resume Game",
|
||||||
|
"Level","Quit");
|
||||||
|
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
rb->lcd_set_foreground(LCD_WHITE);
|
rb->lcd_set_foreground(LCD_WHITE);
|
||||||
rb->lcd_set_background(LCD_BLACK);
|
rb->lcd_set_background(LCD_BLACK);
|
||||||
|
@ -651,11 +646,8 @@ static int chopMenu(int menunum)
|
||||||
|
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
|
|
||||||
m = rb->menu_init(items, sizeof(items) / sizeof(*items),
|
|
||||||
NULL, NULL, NULL, NULL);
|
|
||||||
|
|
||||||
while (!menu_quit) {
|
while (!menu_quit) {
|
||||||
result=rb->menu_show(m);
|
result=rb->do_menu(&menu,&result);
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
case 0: /* Start New Game */
|
case 0: /* Start New Game */
|
||||||
|
@ -685,7 +677,6 @@ static int chopMenu(int menunum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
rb->menu_exit(m);
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2634,8 +2634,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rb->menu_exit(m);
|
|
||||||
|
|
||||||
configfile_save(SETTINGS_FILENAME, config,
|
configfile_save(SETTINGS_FILENAME, config,
|
||||||
sizeof(config)/sizeof(*config),
|
sizeof(config)/sizeof(*config),
|
||||||
SETTINGS_VERSION);
|
SETTINGS_VERSION);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue