summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorStéphane Doyon <s.doyon@videotron.ca>2007-10-12 04:20:20 +0000
committerStéphane Doyon <s.doyon@videotron.ca>2007-10-12 04:20:20 +0000
commit6d08116691cb56c96fbe88028dfe05e2c6198fef (patch)
treecbf63f38b061d9447c9c92024f75d51a09703b08 /apps
parent84ed3fd50fa2685c02c58e45a28b9cae247645ef (diff)
Fix a bug whereby ACTION_TREE_WPS (GO_TO_PREVIOUS_MUSIC) brings us to the
radio, despite playback having been started since we last visited the radio. To reproduce: -go to the radio, -stop and exit it, -go to the browser, and do a playlist insert, or start a playlist from the playlist catalog, anything that starts playback without going to the WPS. -Press ACTION_TREE_WPS. Find yourself back into the radio. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15085 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist.c6
-rw-r--r--apps/root_menu.c9
-rw-r--r--apps/root_menu.h2
3 files changed, 16 insertions, 1 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 99b8c68eb4..47a1f3730d 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -99,6 +99,7 @@
#include "talk.h"
#include "splash.h"
#include "rbunicode.h"
+#include "root_menu.h"
#define PLAYLIST_CONTROL_FILE ROCKBOX_DIR "/.playlist_control"
#define PLAYLIST_CONTROL_FILE_VERSION 2
@@ -2387,6 +2388,11 @@ int playlist_start(int start_index, int offset)
{
struct playlist_info* playlist = &current_playlist;
+ /* Cancel FM radio selection as previous music. For cases where we start
+ playback without going to the WPS, such as playlist insert.. or
+ playlist catalog. */
+ previous_music_is_wps();
+
playlist->index = start_index;
#if CONFIG_CODEC != SWCODEC
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 358dc0bed6..1c6c868bfc 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -487,10 +487,17 @@ static int load_context_screen(int selection)
else
return GO_TO_PREVIOUS;
}
+
+static int previous_music = GO_TO_WPS;
+
+void previous_music_is_wps(void)
+{
+ previous_music = GO_TO_WPS;
+}
+
void root_menu(void)
{
int previous_browser = GO_TO_FILEBROWSER;
- int previous_music = GO_TO_WPS;
int next_screen = GO_TO_ROOT;
int selected = 0;
diff --git a/apps/root_menu.h b/apps/root_menu.h
index 0e189f84fc..4513674447 100644
--- a/apps/root_menu.h
+++ b/apps/root_menu.h
@@ -51,4 +51,6 @@ enum {
extern const struct menu_item_ex root_menu_;
+extern void previous_music_is_wps(void);
+
#endif /* __ROOT_MENU_H__ */