diff options
Diffstat (limited to 'apps/plugin.c')
-rw-r--r-- | apps/plugin.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 9e08951828..9b490d0fa9 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -723,12 +723,18 @@ static const struct plugin_api rockbox_api = { | |||
723 | /* new stuff at the end, sort into place next time | 723 | /* new stuff at the end, sort into place next time |
724 | the API gets incompatible */ | 724 | the API gets incompatible */ |
725 | dir_get_info, | 725 | dir_get_info, |
726 | |||
727 | lc_open, | ||
728 | lc_open_from_mem, | ||
729 | lc_get_header, | ||
730 | lc_close, | ||
726 | }; | 731 | }; |
727 | 732 | ||
728 | int plugin_load(const char* plugin, const void* parameter) | 733 | int plugin_load(const char* plugin, const void* parameter) |
729 | { | 734 | { |
730 | int rc, i; | 735 | int rc, i; |
731 | struct plugin_header *hdr; | 736 | struct plugin_header *p_hdr; |
737 | struct lc_header *hdr; | ||
732 | 738 | ||
733 | #if LCD_DEPTH > 1 | 739 | #if LCD_DEPTH > 1 |
734 | fb_data* old_backdrop; | 740 | fb_data* old_backdrop; |
@@ -754,7 +760,10 @@ int plugin_load(const char* plugin, const void* parameter) | |||
754 | return -1; | 760 | return -1; |
755 | } | 761 | } |
756 | 762 | ||
757 | hdr = lc_get_header(current_plugin_handle); | 763 | p_hdr = lc_get_header(current_plugin_handle); |
764 | |||
765 | hdr = p_hdr ? &p_hdr->lc_hdr : NULL; | ||
766 | |||
758 | 767 | ||
759 | if (hdr == NULL | 768 | if (hdr == NULL |
760 | || hdr->magic != PLUGIN_MAGIC | 769 | || hdr->magic != PLUGIN_MAGIC |
@@ -782,7 +791,7 @@ int plugin_load(const char* plugin, const void* parameter) | |||
782 | plugin_size = 0; | 791 | plugin_size = 0; |
783 | #endif | 792 | #endif |
784 | 793 | ||
785 | *(hdr->api) = &rockbox_api; | 794 | *(p_hdr->api) = &rockbox_api; |
786 | 795 | ||
787 | #if defined HAVE_LCD_BITMAP && LCD_DEPTH > 1 | 796 | #if defined HAVE_LCD_BITMAP && LCD_DEPTH > 1 |
788 | old_backdrop = lcd_get_backdrop(); | 797 | old_backdrop = lcd_get_backdrop(); |
@@ -806,7 +815,7 @@ int plugin_load(const char* plugin, const void* parameter) | |||
806 | open_files = 0; | 815 | open_files = 0; |
807 | #endif | 816 | #endif |
808 | 817 | ||
809 | rc = hdr->entry_point(parameter); | 818 | rc = p_hdr->entry_point(parameter); |
810 | 819 | ||
811 | if (!pfn_tsr_exit) | 820 | if (!pfn_tsr_exit) |
812 | { /* close handle if plugin is no tsr one */ | 821 | { /* close handle if plugin is no tsr one */ |