summaryrefslogtreecommitdiff
path: root/apps/plugins/test_sampr.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-06-16 04:25:21 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-06-16 04:25:21 +0000
commitaf9f4056510f248c4c9c1335167853bb455e8cc0 (patch)
treeeff7ad7726083ee605d753bd9aa9e22213b1acf0 /apps/plugins/test_sampr.c
parentcb57a568e8dc9def607dc9ab27f515309bd13841 (diff)
downloadrockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.zip
rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.gz
rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.bz2
rockbox-af9f4056510f248c4c9c1335167853bb455e8cc0.tar.xz
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/test_sampr.c')
-rw-r--r--apps/plugins/test_sampr.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/apps/plugins/test_sampr.c b/apps/plugins/test_sampr.c
index edfe261..45e1e78 100644
--- a/apps/plugins/test_sampr.c
+++ b/apps/plugins/test_sampr.c
@@ -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;