summaryrefslogtreecommitdiff
path: root/apps/plugins/greyscale.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-08-23 17:12:26 +0000
committerThomas Martitz <kugel@rockbox.org>2010-08-23 17:12:26 +0000
commit93cb949372630d807615f53a8a6379937ed6819f (patch)
tree2dcb5001a9247447a1c64fd0129e64b9d8aba4e6 /apps/plugins/greyscale.c
parentabdc5935beb7dc3fa63bffeec584921ad2a4c8bd (diff)
downloadrockbox-93cb949372630d807615f53a8a6379937ed6819f.tar.gz
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.c9
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 @@
27#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) 27#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4)
28#include "lib/grey.h" 28#include "lib/grey.h"
29 29
30 30PLUGIN_HEADER
31 31
32/* variable button definitions */ 32/* variable button definitions */
33#if CONFIG_KEYPAD == RECORDER_PAD 33#if CONFIG_KEYPAD == RECORDER_PAD
@@ -316,7 +316,9 @@ int main(void)
316 316
317 button = rb->button_get(true); 317 button = rb->button_get(true);
318 318
319 exit_on_usb(button); 319 if (rb->default_event_handler_ex(button, cleanup, NULL)
320 == SYS_USB_CONNECTED)
321 return PLUGIN_USB_CONNECTED;
320 322
321 if (button & GREYSCALE_SHIFT) 323 if (button & GREYSCALE_SHIFT)
322 { 324 {
@@ -367,6 +369,8 @@ int main(void)
367 case GREYSCALE_RC_OFF: 369 case GREYSCALE_RC_OFF:
368#endif 370#endif
369 case GREYSCALE_OFF: 371 case GREYSCALE_OFF:
372
373 cleanup(NULL);
370 return PLUGIN_OK; 374 return PLUGIN_OK;
371 } 375 }
372 } 376 }
@@ -378,7 +382,6 @@ enum plugin_status plugin_start(const void* parameter)
378{ 382{
379 (void)parameter; 383 (void)parameter;
380 384
381 atexit(cleanup);
382 return main(); 385 return main();
383} 386}
384 387