summaryrefslogtreecommitdiff
path: root/apps/plugins/bounce.c
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2006-06-30 16:43:47 +0000
committerKevin Ferrare <kevin@rockbox.org>2006-06-30 16:43:47 +0000
commit0e027bd90c4f0c2aa42c087a1957b42a58e93270 (patch)
treed21b7009fb818c907fcfc2268f1b9a12fd9263de /apps/plugins/bounce.c
parent7bbf53eae502417e6e0fbb204e319310f28f33ad (diff)
downloadrockbox-0e027bd90c4f0c2aa42c087a1957b42a58e93270.tar.gz
rockbox-0e027bd90c4f0c2aa42c087a1957b42a58e93270.zip
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
Diffstat (limited to 'apps/plugins/bounce.c')
-rw-r--r--apps/plugins/bounce.c24
1 files changed, 15 insertions, 9 deletions
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
52#define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL) 52#define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL)
53#define BOUNCE_MODE (BUTTON_SELECT | BUTTON_REL) 53#define BOUNCE_MODE (BUTTON_SELECT | BUTTON_REL)
54 54
55#define BOUNCE_RC_QUIT (BUTTON_RC_STOP | BUTTON_REL)
56
55#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ 57#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \
56 (CONFIG_KEYPAD == IPOD_3G_PAD) 58 (CONFIG_KEYPAD == IPOD_3G_PAD)
57#define BOUNCE_UP BUTTON_SCROLL_BACK 59#define BOUNCE_UP BUTTON_SCROLL_BACK
@@ -337,15 +339,19 @@ static int scrollit(void)
337 while(1) 339 while(1)
338 { 340 {
339 b = rb->button_get_w_tmo(HZ/10); 341 b = rb->button_get_w_tmo(HZ/10);
340 if ( b == BOUNCE_QUIT ) 342 switch(b)
341 return 0; 343 {
342 344#ifdef BOUNCE_RC_QUIT
343 if ( b == BOUNCE_MODE ) 345 case BOUNCE_RC_QUIT :
344 return 1; 346#endif
345 347 case BOUNCE_QUIT :
346 if ( rb->default_event_handler(b) == SYS_USB_CONNECTED ) 348 return 0;
347 return -1; 349 case BOUNCE_MODE :
348 350 return 1;
351 default:
352 if ( rb->default_event_handler(b) == SYS_USB_CONNECTED )
353 return -1;
354 }
349 rb->lcd_clear_display(); 355 rb->lcd_clear_display();
350 356
351 for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) { 357 for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) {