diff options
Diffstat (limited to 'apps/plugin.c')
-rw-r--r-- | apps/plugin.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 6ebb6fad61..7f546011a9 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -157,7 +157,8 @@ static const struct plugin_api rockbox_api = { | |||
157 | backlight_set_timeout_plugged, | 157 | backlight_set_timeout_plugged, |
158 | #endif | 158 | #endif |
159 | is_backlight_on, | 159 | is_backlight_on, |
160 | gui_syncsplash, | 160 | splash, |
161 | splashf, | ||
161 | 162 | ||
162 | #ifdef HAVE_REMOTE_LCD | 163 | #ifdef HAVE_REMOTE_LCD |
163 | /* remote lcd */ | 164 | /* remote lcd */ |
@@ -639,32 +640,32 @@ int plugin_load(const char* plugin, const void* parameter) | |||
639 | plugin_loaded = false; | 640 | plugin_loaded = false; |
640 | } | 641 | } |
641 | 642 | ||
642 | gui_syncsplash(0, ID2P(LANG_WAIT)); | 643 | splash(0, ID2P(LANG_WAIT)); |
643 | strcpy(current_plugin, plugin); | 644 | strcpy(current_plugin, plugin); |
644 | 645 | ||
645 | #ifdef SIMULATOR | 646 | #ifdef SIMULATOR |
646 | hdr = sim_plugin_load((char *)plugin, &pd); | 647 | hdr = sim_plugin_load((char *)plugin, &pd); |
647 | if (pd == NULL) { | 648 | if (pd == NULL) { |
648 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); | 649 | splashf(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); |
649 | return -1; | 650 | return -1; |
650 | } | 651 | } |
651 | if (hdr == NULL | 652 | if (hdr == NULL |
652 | || hdr->magic != PLUGIN_MAGIC | 653 | || hdr->magic != PLUGIN_MAGIC |
653 | || hdr->target_id != TARGET_ID) { | 654 | || hdr->target_id != TARGET_ID) { |
654 | sim_plugin_close(pd); | 655 | sim_plugin_close(pd); |
655 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); | 656 | splash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); |
656 | return -1; | 657 | return -1; |
657 | } | 658 | } |
658 | if (hdr->api_version > PLUGIN_API_VERSION | 659 | if (hdr->api_version > PLUGIN_API_VERSION |
659 | || hdr->api_version < PLUGIN_MIN_API_VERSION) { | 660 | || hdr->api_version < PLUGIN_MIN_API_VERSION) { |
660 | sim_plugin_close(pd); | 661 | sim_plugin_close(pd); |
661 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); | 662 | splash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); |
662 | return -1; | 663 | return -1; |
663 | } | 664 | } |
664 | #else | 665 | #else |
665 | fd = open(plugin, O_RDONLY); | 666 | fd = open(plugin, O_RDONLY); |
666 | if (fd < 0) { | 667 | if (fd < 0) { |
667 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); | 668 | splashf(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); |
668 | return fd; | 669 | return fd; |
669 | } | 670 | } |
670 | #if NUM_CORES > 1 | 671 | #if NUM_CORES > 1 |
@@ -678,7 +679,7 @@ int plugin_load(const char* plugin, const void* parameter) | |||
678 | close(fd); | 679 | close(fd); |
679 | 680 | ||
680 | if (readsize < 0) { | 681 | if (readsize < 0) { |
681 | gui_syncsplash(HZ*2, str(LANG_READ_FAILED), plugin); | 682 | splashf(HZ*2, str(LANG_READ_FAILED), plugin); |
682 | return -1; | 683 | return -1; |
683 | } | 684 | } |
684 | hdr = (struct plugin_header *)pluginbuf; | 685 | hdr = (struct plugin_header *)pluginbuf; |
@@ -688,12 +689,12 @@ int plugin_load(const char* plugin, const void* parameter) | |||
688 | || hdr->target_id != TARGET_ID | 689 | || hdr->target_id != TARGET_ID |
689 | || hdr->load_addr != pluginbuf | 690 | || hdr->load_addr != pluginbuf |
690 | || hdr->end_addr > pluginbuf + PLUGIN_BUFFER_SIZE) { | 691 | || hdr->end_addr > pluginbuf + PLUGIN_BUFFER_SIZE) { |
691 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); | 692 | splash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL)); |
692 | return -1; | 693 | return -1; |
693 | } | 694 | } |
694 | if (hdr->api_version > PLUGIN_API_VERSION | 695 | if (hdr->api_version > PLUGIN_API_VERSION |
695 | || hdr->api_version < PLUGIN_MIN_API_VERSION) { | 696 | || hdr->api_version < PLUGIN_MIN_API_VERSION) { |
696 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); | 697 | splash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION)); |
697 | return -1; | 698 | return -1; |
698 | } | 699 | } |
699 | plugin_size = hdr->end_addr - pluginbuf; | 700 | plugin_size = hdr->end_addr - pluginbuf; |
@@ -768,7 +769,7 @@ int plugin_load(const char* plugin, const void* parameter) | |||
768 | return PLUGIN_USB_CONNECTED; | 769 | return PLUGIN_USB_CONNECTED; |
769 | 770 | ||
770 | default: | 771 | default: |
771 | gui_syncsplash(HZ*2, str(LANG_PLUGIN_ERROR)); | 772 | splash(HZ*2, str(LANG_PLUGIN_ERROR)); |
772 | break; | 773 | break; |
773 | } | 774 | } |
774 | return PLUGIN_OK; | 775 | return PLUGIN_OK; |