forked from len0rd/rockbox
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
This commit is contained in:
parent
cb57a568e8
commit
af9f405651
22 changed files with 729 additions and 1569 deletions
|
@ -19,7 +19,6 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
#include "plugin.h"
|
||||
#include "lib/oldmenuapi.h"
|
||||
|
||||
/* This plugin generates a 1kHz tone + noise in order to quickly verify
|
||||
* hardware samplerate setup is operating correctly.
|
||||
|
@ -285,32 +284,23 @@ enum plugin_status plugin_start(const void *parameter)
|
|||
MENU_QUIT,
|
||||
};
|
||||
|
||||
static const struct menu_item items[] =
|
||||
{
|
||||
MENUITEM_STRINGLIST(menu, "Test Sampr Menu", NULL,
|
||||
#ifndef HAVE_VOLUME_IN_LIST
|
||||
[MENU_VOL_SET] =
|
||||
{ "Set Volume", NULL },
|
||||
"Set Volume",
|
||||
#endif /* HAVE_VOLUME_IN_LIST */
|
||||
[MENU_SAMPR_SET] =
|
||||
{ "Set Samplerate", NULL },
|
||||
[MENU_QUIT] =
|
||||
{ "Quit", NULL },
|
||||
};
|
||||
"Set Samplerate", "Quit");
|
||||
|
||||
bool exit = false;
|
||||
int m;
|
||||
int selected = 0;
|
||||
|
||||
/* Disable all talking before initializing IRAM */
|
||||
rb->talk_disable(true);
|
||||
|
||||
PLUGIN_IRAM_INIT(rb);
|
||||
|
||||
m = menu_init(items, ARRAYLEN(items),
|
||||
NULL, NULL, NULL, NULL);
|
||||
|
||||
while (!exit)
|
||||
{
|
||||
int result = menu_show(m);
|
||||
int result = rb->do_menu(&menu, &selected, NULL, false);
|
||||
|
||||
switch (result)
|
||||
{
|
||||
|
@ -329,8 +319,6 @@ enum plugin_status plugin_start(const void *parameter)
|
|||
}
|
||||
}
|
||||
|
||||
menu_exit(m);
|
||||
|
||||
rb->talk_disable(false);
|
||||
|
||||
return PLUGIN_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue