mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Fix return to root after selecting items from playlist viewer
When selecting an item, Rockbox only checked that playback was stopped before entering the viewer and went to the WPS if music had started playing afterwards, but returned to the root menu otherwise The WPS will now be displayed whenever a new item has been selected, even if audio was paused or playing before. boomark_autoload required slight adjustments to its return values, so that the WPS would not be opened after a user cancels out of the bookmark selection screen for a playlist, since it previously returned true in that case, too. Change-Id: I231ea788e2f80fdda5fe4ad4d2420450931f686f
This commit is contained in:
parent
3b1230b365
commit
3d34140cfb
8 changed files with 70 additions and 28 deletions
|
@ -46,6 +46,7 @@
|
|||
#include "talk.h"
|
||||
#include "playlist_viewer.h"
|
||||
#include "bookmark.h"
|
||||
#include "root_menu.h"
|
||||
|
||||
/* Use for recursive directory search */
|
||||
struct add_track_context {
|
||||
|
@ -160,7 +161,8 @@ static int display_playlists(char* playlist, bool view)
|
|||
|
||||
restart:
|
||||
browse.flags &= ~BROWSE_SELECTED;
|
||||
rockbox_browse(&browse);
|
||||
if (rockbox_browse(&browse) == GO_TO_WPS)
|
||||
result = 0;
|
||||
|
||||
if (browse.flags & BROWSE_SELECTED)
|
||||
{
|
||||
|
@ -169,13 +171,24 @@ restart:
|
|||
|
||||
if (view)
|
||||
{
|
||||
|
||||
if (!bookmark_autoload(selected_playlist))
|
||||
|
||||
int res = bookmark_autoload(selected_playlist);
|
||||
if (res == BOOKMARK_DO_RESUME)
|
||||
result = 0;
|
||||
else
|
||||
{
|
||||
if (playlist_viewer_ex(selected_playlist) == PLAYLIST_VIEWER_CANCEL)
|
||||
goto restart;
|
||||
switch (playlist_viewer_ex(selected_playlist)) {
|
||||
case PLAYLIST_VIEWER_OK:
|
||||
result = 0;
|
||||
break;
|
||||
case PLAYLIST_VIEWER_CANCEL:
|
||||
goto restart;
|
||||
case PLAYLIST_VIEWER_USB:
|
||||
case PLAYLIST_VIEWER_MAINMENU:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
result = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue