From 68de2581ba68282bbda9c63bc209c43252f1336c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=A4ggqvist?= Date: Wed, 31 Aug 2005 00:30:46 +0000 Subject: [PATCH] Fake an USB connections to force reload of the file-tree after running these viewers. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7434 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/midi2wav.c | 3 ++- apps/plugins/searchengine/searchengine.c | 4 ++++ apps/plugins/wav2wv.c | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/plugins/midi2wav.c b/apps/plugins/midi2wav.c index 1a87fa8bfd..e0f9e83fd2 100644 --- a/apps/plugins/midi2wav.c +++ b/apps/plugins/midi2wav.c @@ -85,7 +85,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) return PLUGIN_ERROR; } rb->splash(HZ*3, true, "FINISHED PLAYING"); - return PLUGIN_OK; + /* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */ + return PLUGIN_USB_CONNECTED; } signed char outputBuffer[3000] IDATA_ATTR; /* signed char.. gonna run out of iram ... ! */ diff --git a/apps/plugins/searchengine/searchengine.c b/apps/plugins/searchengine/searchengine.c index 566163ab00..8953ba7552 100644 --- a/apps/plugins/searchengine/searchengine.c +++ b/apps/plugins/searchengine/searchengine.c @@ -94,5 +94,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) } rb->snprintf(buf,250,"Hits: %d",hits); rb->splash(HZ*3,true,buf); + if (result!=0) { + /* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */ + return PLUGIN_USB_CONNECTED; + } return PLUGIN_OK; } diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c index 4cb7b14f2a..935c0ed4c6 100644 --- a/apps/plugins/wav2wv.c +++ b/apps/plugins/wav2wv.c @@ -310,5 +310,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void *parameter) #ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost(false); #endif - return PLUGIN_OK; + /* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */ + return PLUGIN_USB_CONNECTED; }