diff options
Diffstat (limited to 'apps/plugins/text_viewer/text_viewer.c')
-rw-r--r-- | apps/plugins/text_viewer/text_viewer.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/plugins/text_viewer/text_viewer.c b/apps/plugins/text_viewer/text_viewer.c index e5f3160bb6..ca5cf70d36 100644 --- a/apps/plugins/text_viewer/text_viewer.c +++ b/apps/plugins/text_viewer/text_viewer.c | |||
@@ -35,13 +35,23 @@ enum plugin_status plugin_start(const void* file) | |||
35 | long old_tick; | 35 | long old_tick; |
36 | bool done = false; | 36 | bool done = false; |
37 | bool display_update = true; | 37 | bool display_update = true; |
38 | size_t size; | ||
39 | unsigned char *plugin_buf; | ||
38 | 40 | ||
39 | old_tick = *rb->current_tick; | 41 | old_tick = *rb->current_tick; |
40 | 42 | ||
41 | if (!file) | 43 | if (!file) |
42 | return PLUGIN_ERROR; | 44 | return PLUGIN_ERROR; |
43 | 45 | ||
44 | if (!tv_init(file)) { | 46 | /* get the plugin buffer */ |
47 | plugin_buf = rb->plugin_get_buffer(&size); | ||
48 | |||
49 | if (!tv_init_action(&plugin_buf, &size)) { | ||
50 | rb->splash(HZ, "Error initialize"); | ||
51 | return PLUGIN_ERROR; | ||
52 | } | ||
53 | |||
54 | if (!tv_load_file(file)) { | ||
45 | rb->splash(HZ, "Error opening file"); | 55 | rb->splash(HZ, "Error opening file"); |
46 | return PLUGIN_ERROR; | 56 | return PLUGIN_ERROR; |
47 | } | 57 | } |