From 2cdf332f01bf3a9904f8322596bb81740ea3fe6b Mon Sep 17 00:00:00 2001 From: Yoshihisa Uchida Date: Fri, 2 Jul 2010 12:16:47 +0000 Subject: text viewer: for tv_action and tv_bookmark, the prototype of the initializer is the same arguments as other modules. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27243 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/text_viewer/text_viewer.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'apps/plugins/text_viewer/text_viewer.c') 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) long old_tick; bool done = false; bool display_update = true; + size_t size; + unsigned char *plugin_buf; old_tick = *rb->current_tick; if (!file) return PLUGIN_ERROR; - if (!tv_init(file)) { + /* get the plugin buffer */ + plugin_buf = rb->plugin_get_buffer(&size); + + if (!tv_init_action(&plugin_buf, &size)) { + rb->splash(HZ, "Error initialize"); + return PLUGIN_ERROR; + } + + if (!tv_load_file(file)) { rb->splash(HZ, "Error opening file"); return PLUGIN_ERROR; } -- cgit v1.2.3