summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/bounce.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c
index 6715b0b..e31c15e 100644
--- a/apps/plugins/bounce.c
+++ b/apps/plugins/bounce.c
@@ -290,18 +290,14 @@ static int loopit(void)
{
b = rb->button_get_w_tmo(HZ/10);
if ( b == (BUTTON_OFF|BUTTON_REL) )
- return 0;
-
- if ( b == SYS_USB_CONNECTED) {
- rb->usb_screen();
- return 0;
- }
-
- if ( b == (BUTTON_ON|BUTTON_REL) )
- return 1;
+ return PLUGIN_OK;
else if(b != BUTTON_NONE)
timeout=20;
+ if ( rb->default_event_handler(b) == SYS_USB_CONNECTED) {
+ return PLUGIN_USB_CONNECTED;
+ }
+
y+= speed[ysanke&15] + values[NUM_YADD].num;
x+= speed[xsanke&15] + values[NUM_XADD].num;