From 2afdf95401e243373050b9bda554e8f216664fd0 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 22 Oct 2004 00:22:07 +0000 Subject: Plugin rework 5: (all) Now using the default event handler, standard placement is in switch() default case. (splitedit,star,vu_meter) Compile-time keyboard configuration, for Ondio adaption. (splitedit) Timing kludge for MMC. (star) Completed USB support. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5321 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/jackpot.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'apps/plugins/jackpot.c') diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index 7cf6e10..e392c3b 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c @@ -64,8 +64,10 @@ static void display_first_line(int g) } /*Call when the program exit*/ -static void jackpot_exit(void) +static void jackpot_exit(void *parameter) { + (void)parameter; + /* Restore the old pattern (i don't find another way to do this. Any idea?) */ rb->lcd_unlock_pattern(h1); @@ -154,10 +156,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) } break; - case SYS_USB_CONNECTED: - rb->usb_screen(); - jackpot_exit(); - return PLUGIN_USB_CONNECTED; + default: + if (rb->default_event_handler_ex(button, jackpot_exit, + NULL) == SYS_USB_CONNECTED) + return PLUGIN_USB_CONNECTED; + break; } } @@ -270,7 +273,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) } /* This is the end */ - jackpot_exit(); + jackpot_exit(NULL); /* Bye */ return PLUGIN_OK; } -- cgit v1.1