summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index b45b25f7ff..adf207da79 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -856,6 +856,10 @@ int plugin_load(const char* plugin, const void* parameter)
856 if (!plugin) 856 if (!plugin)
857 return PLUGIN_ERROR; 857 return PLUGIN_ERROR;
858 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
859 if (current_plugin_handle && pfn_tsr_exit) 863 if (current_plugin_handle && pfn_tsr_exit)
860 { /* if we have a resident old plugin and a callback */ 864 { /* if we have a resident old plugin and a callback */
861 bool reenter = (strcmp(current_plugin, plugin) == 0); 865 bool reenter = (strcmp(current_plugin, plugin) == 0);
@@ -923,7 +927,8 @@ int plugin_load(const char* plugin, const void* parameter)
923 927
924 *(p_hdr->api) = &rockbox_api; 928 *(p_hdr->api) = &rockbox_api;
925 lcd_set_viewport(NULL); 929 lcd_set_viewport(NULL);
926 lcd_clear_display(); 930 if (!theme_enabled)
931 lcd_clear_display();
927 932
928#ifdef HAVE_REMOTE_LCD 933#ifdef HAVE_REMOTE_LCD
929 lcd_remote_set_viewport(NULL); 934 lcd_remote_set_viewport(NULL);
@@ -938,8 +943,9 @@ int plugin_load(const char* plugin, const void* parameter)
938 * they should be fixed properly instead of this lock */ 943 * they should be fixed properly instead of this lock */
939 tree_lock_cache(tree_get_context()); 944 tree_lock_cache(tree_get_context());
940 945
941 FOR_NB_SCREENS(i) 946 if (!theme_enabled)
942 viewportmanager_theme_enable(i, false, NULL); 947 FOR_NB_SCREENS(i)
948 viewportmanager_theme_enable(i, false, NULL);
943 949
944#ifdef HAVE_TOUCHSCREEN 950#ifdef HAVE_TOUCHSCREEN
945 touchscreen_set_mode(TOUCHSCREEN_BUTTON); 951 touchscreen_set_mode(TOUCHSCREEN_BUTTON);
@@ -1000,13 +1006,16 @@ int plugin_load(const char* plugin, const void* parameter)
1000#endif 1006#endif
1001#endif 1007#endif
1002 1008
1003 lcd_clear_display();
1004#ifdef HAVE_REMOTE_LCD 1009#ifdef HAVE_REMOTE_LCD
1005 lcd_remote_clear_display(); 1010 lcd_remote_clear_display();
1006#endif 1011#endif
1007 1012
1008 FOR_NB_SCREENS(i) 1013 if (!theme_enabled)
1009 viewportmanager_theme_undo(i, true); 1014 {
1015 lcd_clear_display();
1016 FOR_NB_SCREENS(i)
1017 viewportmanager_theme_undo(i, true);
1018 }
1010 1019
1011 plugin_check_open_close__exit(); 1020 plugin_check_open_close__exit();
1012 1021