From 93cb949372630d807615f53a8a6379937ed6819f Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 23 Aug 2010 17:12:26 +0000 Subject: Revert "Introduce plugin_crt0.c that every plugin links." Too much errors and no time to fix them now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27863 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/jackpot.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'apps/plugins/jackpot.c') diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index abf1cf8..56c2910 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c @@ -22,9 +22,8 @@ #include "plugin.h" #include "lib/pluginlib_actions.h" #include "lib/picture.h" -#include "lib/pluginlib_exit.h" - +PLUGIN_HEADER const struct button_mapping* plugin_contexts[]={pla_main_ctx}; #define NB_PICTURES 9 @@ -110,8 +109,9 @@ void patterns_deinit(struct screen* display) #endif /* HAVE_LCD_CHARCELLS */ /*Call when the program exit*/ -void jackpot_exit(void) +void jackpot_exit(void *parameter) { + (void)parameter; #ifdef HAVE_LCD_CHARCELLS patterns_deinit(rb->screens[SCREEN_MAIN]); #endif /* HAVE_LCD_CHARCELLS */ @@ -298,7 +298,6 @@ enum plugin_status plugin_start(const void* parameter) int action, i; struct jackpot game; (void)parameter; - atexit(jackpot_exit); rb->srand(*rb->current_tick); #ifdef HAVE_LCD_CHARCELLS patterns_init(rb->screens[SCREEN_MAIN]); @@ -324,9 +323,12 @@ enum plugin_status plugin_start(const void* parameter) break; default: - exit_on_usb(action); + if (rb->default_event_handler_ex(action, jackpot_exit, NULL) + == SYS_USB_CONNECTED) + return PLUGIN_USB_CONNECTED; break; } } + jackpot_exit(NULL); return PLUGIN_OK; } -- cgit v1.1