From 0e027bd90c4f0c2aa42c087a1957b42a58e93270 Mon Sep 17 00:00:00 2001 From: Kevin Ferrare Date: Fri, 30 Jun 2006 16:43:47 +0000 Subject: To avoid having to use the main unit when accidentally launching a plugin from the remote, plugins now support remote quit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10157 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/bounce.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'apps/plugins/bounce.c') diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index b69f64ee85..c0c757c009 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c @@ -52,6 +52,8 @@ PLUGIN_HEADER #define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL) #define BOUNCE_MODE (BUTTON_SELECT | BUTTON_REL) +#define BOUNCE_RC_QUIT (BUTTON_RC_STOP | BUTTON_REL) + #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ (CONFIG_KEYPAD == IPOD_3G_PAD) #define BOUNCE_UP BUTTON_SCROLL_BACK @@ -337,15 +339,19 @@ static int scrollit(void) while(1) { b = rb->button_get_w_tmo(HZ/10); - if ( b == BOUNCE_QUIT ) - return 0; - - if ( b == BOUNCE_MODE ) - return 1; - - if ( rb->default_event_handler(b) == SYS_USB_CONNECTED ) - return -1; - + switch(b) + { +#ifdef BOUNCE_RC_QUIT + case BOUNCE_RC_QUIT : +#endif + case BOUNCE_QUIT : + return 0; + case BOUNCE_MODE : + return 1; + default: + if ( rb->default_event_handler(b) == SYS_USB_CONNECTED ) + return -1; + } rb->lcd_clear_display(); for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) { -- cgit v1.2.3