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/text_viewer/text_viewer.c | |
parent | abdc5935beb7dc3fa63bffeec584921ad2a4c8bd (diff) | |
download | rockbox-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/text_viewer/text_viewer.c')
-rw-r--r-- | apps/plugins/text_viewer/text_viewer.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/plugins/text_viewer/text_viewer.c b/apps/plugins/text_viewer/text_viewer.c index 5d06d4b477..eae85213ac 100644 --- a/apps/plugins/text_viewer/text_viewer.c +++ b/apps/plugins/text_viewer/text_viewer.c | |||
@@ -21,12 +21,11 @@ | |||
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "lib/pluginlib_exit.h" | ||
25 | #include "tv_action.h" | 24 | #include "tv_action.h" |
26 | #include "tv_button.h" | 25 | #include "tv_button.h" |
27 | #include "tv_preferences.h" | 26 | #include "tv_preferences.h" |
28 | 27 | ||
29 | 28 | PLUGIN_HEADER | |
30 | 29 | ||
31 | enum plugin_status plugin_start(const void* file) | 30 | enum plugin_status plugin_start(const void* file) |
32 | { | 31 | { |
@@ -57,7 +56,6 @@ enum plugin_status plugin_start(const void* file) | |||
57 | return PLUGIN_ERROR; | 56 | return PLUGIN_ERROR; |
58 | } | 57 | } |
59 | 58 | ||
60 | atexit(tv_exit); | ||
61 | while (!done) { | 59 | while (!done) { |
62 | #ifdef HAVE_LCD_BITMAP | 60 | #ifdef HAVE_LCD_BITMAP |
63 | if (rb->global_settings->statusbar != STATUSBAR_OFF && preferences->statusbar) | 61 | if (rb->global_settings->statusbar != STATUSBAR_OFF && preferences->statusbar) |
@@ -81,12 +79,12 @@ enum plugin_status plugin_start(const void* file) | |||
81 | 79 | ||
82 | if (res != TV_MENU_RESULT_EXIT_MENU) | 80 | if (res != TV_MENU_RESULT_EXIT_MENU) |
83 | { | 81 | { |
82 | tv_exit(NULL); | ||
83 | done = true; | ||
84 | if (res == TV_MENU_RESULT_ATTACHED_USB) | 84 | if (res == TV_MENU_RESULT_ATTACHED_USB) |
85 | return PLUGIN_USB_CONNECTED; | 85 | return PLUGIN_USB_CONNECTED; |
86 | else if (res == TV_MENU_RESULT_ERROR) | 86 | else if (res == TV_MENU_RESULT_ERROR) |
87 | return PLUGIN_ERROR; | 87 | return PLUGIN_ERROR; |
88 | else | ||
89 | done = true; | ||
90 | } | 88 | } |
91 | } | 89 | } |
92 | break; | 90 | break; |
@@ -197,6 +195,7 @@ enum plugin_status plugin_start(const void* file) | |||
197 | #ifdef TV_QUIT2 | 195 | #ifdef TV_QUIT2 |
198 | case TV_QUIT2: | 196 | case TV_QUIT2: |
199 | #endif | 197 | #endif |
198 | tv_exit(NULL); | ||
200 | done = true; | 199 | done = true; |
201 | break; | 200 | break; |
202 | 201 | ||
@@ -205,7 +204,9 @@ enum plugin_status plugin_start(const void* file) | |||
205 | break; | 204 | break; |
206 | 205 | ||
207 | default: | 206 | default: |
208 | exit_on_usb(button); | 207 | if (rb->default_event_handler_ex(button, tv_exit, NULL) |
208 | == SYS_USB_CONNECTED) | ||
209 | return PLUGIN_USB_CONNECTED; | ||
209 | display_update = false; | 210 | display_update = false; |
210 | break; | 211 | break; |
211 | } | 212 | } |