summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index d6a5d067ce..f08a98753a 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -664,6 +664,7 @@ static const struct plugin_api rockbox_api = {
664int plugin_load(const char* plugin, const void* parameter) 664int plugin_load(const char* plugin, const void* parameter)
665{ 665{
666 int rc; 666 int rc;
667 int i;
667 int oldbars; 668 int oldbars;
668 struct plugin_header *hdr; 669 struct plugin_header *hdr;
669#ifdef SIMULATOR 670#ifdef SIMULATOR
@@ -804,8 +805,6 @@ int plugin_load(const char* plugin, const void* parameter)
804#endif /* LCD_DEPTH */ 805#endif /* LCD_DEPTH */
805#endif /* HAVE_LCD_BITMAP */ 806#endif /* HAVE_LCD_BITMAP */
806 807
807 lcd_clear_display();
808 lcd_update();
809 808
810#ifdef HAVE_REMOTE_LCD 809#ifdef HAVE_REMOTE_LCD
811#if LCD_REMOTE_DEPTH > 1 810#if LCD_REMOTE_DEPTH > 1
@@ -814,32 +813,27 @@ int plugin_load(const char* plugin, const void* parameter)
814#else 813#else
815 lcd_remote_set_drawmode(DRMODE_SOLID); 814 lcd_remote_set_drawmode(DRMODE_SOLID);
816#endif 815#endif
817 lcd_remote_clear_display(); 816#endif
818
819
820 lcd_remote_update();
821 817
818 if (rc != PLUGIN_GOTO_WPS)
819 {
820 FOR_NB_SCREENS(i)
821 {
822 screens[i].clear_display();
823 screens[i].update();
824 }
825 }
822 826
823#endif
824 viewportmanager_set_statusbar(oldbars); 827 viewportmanager_set_statusbar(oldbars);
825 if (pfn_tsr_exit == NULL) 828 if (pfn_tsr_exit == NULL)
826 plugin_loaded = false; 829 plugin_loaded = false;
827 830
828 sim_plugin_close(pd); 831 sim_plugin_close(pd);
829 832
830 switch (rc) { 833 if (rc == PLUGIN_ERROR)
831 case PLUGIN_OK: 834 splash(HZ*2, str(LANG_PLUGIN_ERROR));
832 break;
833
834 case PLUGIN_USB_CONNECTED:
835 return PLUGIN_USB_CONNECTED;
836
837 default:
838 splash(HZ*2, str(LANG_PLUGIN_ERROR));
839 break;
840 }
841 835
842 return PLUGIN_OK; 836 return rc;
843} 837}
844 838
845/* Returns a pointer to the portion of the plugin buffer that is not already 839/* Returns a pointer to the portion of the plugin buffer that is not already