From 4b8ee8dbb24927cd104ebb8b62d340d76cc41069 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sat, 21 Aug 2004 23:29:55 +0000 Subject: [PATCH] Minor code-policing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5005 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/vu_meter.c | 11 +++++++---- 1 file 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; } }