diff options
Diffstat (limited to 'apps/plugins/greyscale.c')
-rw-r--r-- | apps/plugins/greyscale.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c index 73dd98b216..33254439b6 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 | PLUGIN_HEADER | 30 | |
31 | 31 | ||
32 | /* variable button definitions */ | 32 | /* variable button definitions */ |
33 | #if CONFIG_KEYPAD == RECORDER_PAD | 33 | #if CONFIG_KEYPAD == RECORDER_PAD |
@@ -316,9 +316,7 @@ int main(void) | |||
316 | 316 | ||
317 | button = rb->button_get(true); | 317 | button = rb->button_get(true); |
318 | 318 | ||
319 | if (rb->default_event_handler_ex(button, cleanup, NULL) | 319 | exit_on_usb(button); |
320 | == SYS_USB_CONNECTED) | ||
321 | return PLUGIN_USB_CONNECTED; | ||
322 | 320 | ||
323 | if (button & GREYSCALE_SHIFT) | 321 | if (button & GREYSCALE_SHIFT) |
324 | { | 322 | { |
@@ -369,8 +367,6 @@ int main(void) | |||
369 | case GREYSCALE_RC_OFF: | 367 | case GREYSCALE_RC_OFF: |
370 | #endif | 368 | #endif |
371 | case GREYSCALE_OFF: | 369 | case GREYSCALE_OFF: |
372 | |||
373 | cleanup(NULL); | ||
374 | return PLUGIN_OK; | 370 | return PLUGIN_OK; |
375 | } | 371 | } |
376 | } | 372 | } |
@@ -382,6 +378,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
382 | { | 378 | { |
383 | (void)parameter; | 379 | (void)parameter; |
384 | 380 | ||
381 | atexit(cleanup); | ||
385 | return main(); | 382 | return main(); |
386 | } | 383 | } |
387 | 384 | ||