diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2009-07-05 22:12:42 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2009-07-05 22:12:42 +0000 |
| commit | df6f955a82bce03650f24f562926ae9e7ffa58d4 (patch) | |
| tree | 0fd59aa1160d6b1ddf5728e81ccb39db2fc94809 /apps/plugin.c | |
| parent | 9431ea8c6539349126c93492f902292436f66339 (diff) | |
| download | rockbox-df6f955a82bce03650f24f562926ae9e7ffa58d4.zip rockbox-df6f955a82bce03650f24f562926ae9e7ffa58d4.tar.gz rockbox-df6f955a82bce03650f24f562926ae9e7ffa58d4.tar.bz2 rockbox-df6f955a82bce03650f24f562926ae9e7ffa58d4.tar.xz | |
Add a possibility for plugins to go directly to the WPS after exiting.
It only works for plugins executed via the filebrowser for now. Those
executed from the context menu or a simplelist (such as "Open With...") need additional hacking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21680 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
| -rw-r--r-- | apps/plugin.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index d6a5d06..f08a987 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -664,6 +664,7 @@ static const struct plugin_api rockbox_api = { int plugin_load(const char* plugin, const void* parameter) { int rc; + int i; int oldbars; struct plugin_header *hdr; #ifdef SIMULATOR @@ -804,8 +805,6 @@ int plugin_load(const char* plugin, const void* parameter) #endif /* LCD_DEPTH */ #endif /* HAVE_LCD_BITMAP */ - lcd_clear_display(); - lcd_update(); #ifdef HAVE_REMOTE_LCD #if LCD_REMOTE_DEPTH > 1 @@ -814,32 +813,27 @@ int plugin_load(const char* plugin, const void* parameter) #else lcd_remote_set_drawmode(DRMODE_SOLID); #endif - lcd_remote_clear_display(); - - - lcd_remote_update(); +#endif + if (rc != PLUGIN_GOTO_WPS) + { + FOR_NB_SCREENS(i) + { + screens[i].clear_display(); + screens[i].update(); + } + } -#endif viewportmanager_set_statusbar(oldbars); if (pfn_tsr_exit == NULL) plugin_loaded = false; sim_plugin_close(pd); - switch (rc) { - case PLUGIN_OK: - break; - - case PLUGIN_USB_CONNECTED: - return PLUGIN_USB_CONNECTED; - - default: - splash(HZ*2, str(LANG_PLUGIN_ERROR)); - break; - } + if (rc == PLUGIN_ERROR) + splash(HZ*2, str(LANG_PLUGIN_ERROR)); - return PLUGIN_OK; + return rc; } /* Returns a pointer to the portion of the plugin buffer that is not already |