summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-08-21 23:29:55 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-08-21 23:29:55 +0000
commit4b8ee8dbb24927cd104ebb8b62d340d76cc41069 (patch)
tree49efb6546282c3b9495b65a9f5591bd4be5f1c88
parent792bd17a089c290a201a811fd64f5a6f5f21ff2f (diff)
Minor code-policing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5005 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/vu_meter.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index c400a4e189..acc6abed00 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -380,6 +380,8 @@ void digital_meter(void) {
}
enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
+ int button;
+
TEST_PLUGIN_API(api);
(void) parameter;
rb = api;
@@ -400,7 +402,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
rb->lcd_update();
- switch (rb->button_get_w_tmo(1))
+ button = rb->button_get_w_tmo(1);
+ switch (button)
{
case BUTTON_OFF:
save_settings();
@@ -430,9 +433,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
change_volume(-1);
break;
- case SYS_USB_CONNECTED:
- rb->usb_screen();
- return PLUGIN_USB_CONNECTED;
+ default:
+ if(rb->default_event_handler(button) == SYS_USB_CONNECTED)
+ return PLUGIN_USB_CONNECTED;
break;
}
}