summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/text_viewer.c
diff options
context:
space:
mode:
authorYoshihisa Uchida <uchida@rockbox.org>2010-07-02 12:16:47 +0000
committerYoshihisa Uchida <uchida@rockbox.org>2010-07-02 12:16:47 +0000
commit2cdf332f01bf3a9904f8322596bb81740ea3fe6b (patch)
tree25f1f2826798ed0812000a86256a8c35a9782355 /apps/plugins/text_viewer/text_viewer.c
parent0fef85e9dbdc31c593ffda7b3d4f8062eec503f2 (diff)
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
Diffstat (limited to 'apps/plugins/text_viewer/text_viewer.c')
-rw-r--r--apps/plugins/text_viewer/text_viewer.c12
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)
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;
}