summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c42
1 files changed, 26 insertions, 16 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 7c80e5c6e1..adf207da79 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -352,7 +352,6 @@ static const struct plugin_api rockbox_api = {
352 yesno_pop, 352 yesno_pop,
353 353
354 /* action handling */ 354 /* action handling */
355 list_do_action,
356 get_custom_action, 355 get_custom_action,
357 get_action, 356 get_action,
358#ifdef HAVE_TOUCHSCREEN 357#ifdef HAVE_TOUCHSCREEN
@@ -422,6 +421,7 @@ static const struct plugin_api rockbox_api = {
422 crc_32, 421 crc_32,
423 crc_32r, 422 crc_32r,
424 filetype_get_attr, 423 filetype_get_attr,
424 filetype_get_plugin,
425 425
426 /* dir */ 426 /* dir */
427 FS_PREFIX(opendir), 427 FS_PREFIX(opendir),
@@ -582,6 +582,9 @@ static const struct plugin_api rockbox_api = {
582 utf8length, 582 utf8length,
583 utf8seek, 583 utf8seek,
584 584
585 /* language */
586 lang_is_rtl,
587
585 /* the buflib memory management library */ 588 /* the buflib memory management library */
586 buflib_init, 589 buflib_init,
587 buflib_available, 590 buflib_available,
@@ -665,7 +668,7 @@ static const struct plugin_api rockbox_api = {
665 668
666 /* metadata */ 669 /* metadata */
667 get_metadata, 670 get_metadata,
668 mp3info, 671 get_codec_string,
669 count_mp3_frames, 672 count_mp3_frames,
670 create_xing_header, 673 create_xing_header,
671#ifdef HAVE_TAGCACHE 674#ifdef HAVE_TAGCACHE
@@ -677,6 +680,7 @@ static const struct plugin_api rockbox_api = {
677 tagcache_search_finish, 680 tagcache_search_finish,
678 tagcache_get_numeric, 681 tagcache_get_numeric,
679 tagcache_get_stat, 682 tagcache_get_stat,
683 tagcache_commit_finalize,
680#if defined(HAVE_TC_RAMCACHE) 684#if defined(HAVE_TC_RAMCACHE)
681 tagcache_is_in_ram, 685 tagcache_is_in_ram,
682#if defined(HAVE_DIRCACHE) 686#if defined(HAVE_DIRCACHE)
@@ -694,6 +698,9 @@ static const struct plugin_api rockbox_api = {
694 playlist_get_current, 698 playlist_get_current,
695 playlist_get_resume_info, 699 playlist_get_resume_info,
696 playlist_get_track_info, 700 playlist_get_track_info,
701 playlist_get_first_index,
702 playlist_get_display_index,
703 playlist_entries_iterate,
697 playlist_amount, 704 playlist_amount,
698 playlist_resume, 705 playlist_resume,
699 playlist_resume_track, 706 playlist_resume_track,
@@ -833,14 +840,8 @@ static const struct plugin_api rockbox_api = {
833 840
834 /* new stuff at the end, sort into place next time 841 /* new stuff at the end, sort into place next time
835 the API gets incompatible */ 842 the API gets incompatible */
836#ifdef HAVE_TAGCACHE 843
837 tagcache_commit_finalize, 844 talk_fullpath,
838#endif
839 playlist_get_first_index,
840 playlist_get_display_index,
841 filetype_get_plugin,
842 playlist_entries_iterate,
843 lang_is_rtl,
844}; 845};
845 846
846static int plugin_buffer_handle; 847static int plugin_buffer_handle;
@@ -855,6 +856,10 @@ int plugin_load(const char* plugin, const void* parameter)
855 if (!plugin) 856 if (!plugin)
856 return PLUGIN_ERROR; 857 return PLUGIN_ERROR;
857 858
859 /* for some plugins, the SBS can be left enabled */
860 const char *sepch = strrchr(plugin, PATH_SEPCH);
861 bool theme_enabled = sepch && !strcmp("properties.rock", sepch + 1);
862
858 if (current_plugin_handle && pfn_tsr_exit) 863 if (current_plugin_handle && pfn_tsr_exit)
859 { /* if we have a resident old plugin and a callback */ 864 { /* if we have a resident old plugin and a callback */
860 bool reenter = (strcmp(current_plugin, plugin) == 0); 865 bool reenter = (strcmp(current_plugin, plugin) == 0);
@@ -922,7 +927,8 @@ int plugin_load(const char* plugin, const void* parameter)
922 927
923 *(p_hdr->api) = &rockbox_api; 928 *(p_hdr->api) = &rockbox_api;
924 lcd_set_viewport(NULL); 929 lcd_set_viewport(NULL);
925 lcd_clear_display(); 930 if (!theme_enabled)
931 lcd_clear_display();
926 932
927#ifdef HAVE_REMOTE_LCD 933#ifdef HAVE_REMOTE_LCD
928 lcd_remote_set_viewport(NULL); 934 lcd_remote_set_viewport(NULL);
@@ -937,8 +943,9 @@ int plugin_load(const char* plugin, const void* parameter)
937 * they should be fixed properly instead of this lock */ 943 * they should be fixed properly instead of this lock */
938 tree_lock_cache(tree_get_context()); 944 tree_lock_cache(tree_get_context());
939 945
940 FOR_NB_SCREENS(i) 946 if (!theme_enabled)
941 viewportmanager_theme_enable(i, false, NULL); 947 FOR_NB_SCREENS(i)
948 viewportmanager_theme_enable(i, false, NULL);
942 949
943#ifdef HAVE_TOUCHSCREEN 950#ifdef HAVE_TOUCHSCREEN
944 touchscreen_set_mode(TOUCHSCREEN_BUTTON); 951 touchscreen_set_mode(TOUCHSCREEN_BUTTON);
@@ -999,13 +1006,16 @@ int plugin_load(const char* plugin, const void* parameter)
999#endif 1006#endif
1000#endif 1007#endif
1001 1008
1002 lcd_clear_display();
1003#ifdef HAVE_REMOTE_LCD 1009#ifdef HAVE_REMOTE_LCD
1004 lcd_remote_clear_display(); 1010 lcd_remote_clear_display();
1005#endif 1011#endif
1006 1012
1007 FOR_NB_SCREENS(i) 1013 if (!theme_enabled)
1008 viewportmanager_theme_undo(i, true); 1014 {
1015 lcd_clear_display();
1016 FOR_NB_SCREENS(i)
1017 viewportmanager_theme_undo(i, true);
1018 }
1009 1019
1010 plugin_check_open_close__exit(); 1020 plugin_check_open_close__exit();
1011 1021