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/greyscale.c | |
parent | abdc5935beb7dc3fa63bffeec584921ad2a4c8bd (diff) | |
download | rockbox-93cb949372630d807615f53a8a6379937ed6819f.tar.gz rockbox-93cb949372630d807615f53a8a6379937ed6819f.tar.bz2 rockbox-93cb949372630d807615f53a8a6379937ed6819f.zip |
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/greyscale.c')
-rw-r--r-- | apps/plugins/greyscale.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c index 33254439b6..73dd98b216 100644 --- a/apps/plugins/greyscale.c +++ b/apps/plugins/greyscale.c @@ -27,7 +27,7 @@ #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) #include "lib/grey.h" - +PLUGIN_HEADER /* variable button definitions */ #if CONFIG_KEYPAD == RECORDER_PAD @@ -316,7 +316,9 @@ int main(void) button = rb->button_get(true); - exit_on_usb(button); + if (rb->default_event_handler_ex(button, cleanup, NULL) + == SYS_USB_CONNECTED) + return PLUGIN_USB_CONNECTED; if (button & GREYSCALE_SHIFT) { @@ -367,6 +369,8 @@ int main(void) case GREYSCALE_RC_OFF: #endif case GREYSCALE_OFF: + + cleanup(NULL); return PLUGIN_OK; } } @@ -378,7 +382,6 @@ enum plugin_status plugin_start(const void* parameter) { (void)parameter; - atexit(cleanup); return main(); } |