diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2010-08-23 17:12:26 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2010-08-23 17:12:26 +0000 |
| commit | 93cb949372630d807615f53a8a6379937ed6819f (patch) | |
| tree | 2dcb5001a9247447a1c64fd0129e64b9d8aba4e6 /apps/plugins/jackpot.c | |
| parent | abdc5935beb7dc3fa63bffeec584921ad2a4c8bd (diff) | |
| download | rockbox-93cb949372630d807615f53a8a6379937ed6819f.zip rockbox-93cb949372630d807615f53a8a6379937ed6819f.tar.gz rockbox-93cb949372630d807615f53a8a6379937ed6819f.tar.bz2 rockbox-93cb949372630d807615f53a8a6379937ed6819f.tar.xz | |
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
Diffstat (limited to 'apps/plugins/jackpot.c')
| -rw-r--r-- | apps/plugins/jackpot.c | 12 |
1 files changed, 7 insertions, 5 deletions
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; } |