summaryrefslogtreecommitdiffstats
path: root/apps/onplay.c
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-10-21 23:33:48 +0200
committerSolomon Peachy <pizza@shaftnet.org>2021-12-02 17:38:42 -0500
commit6325971451fc593006f3703353ef02db7c92ee1c (patch)
treee1c4393e7537c5dde830ffc461d2efd4b2e780e7 /apps/onplay.c
parent8325b59f3b2b7eee3d4e7476371e3bd3019fe612 (diff)
downloadrockbox-6325971451fc593006f3703353ef02db7c92ee1c.tar.gz
rockbox-6325971451fc593006f3703353ef02db7c92ee1c.zip
Warn before replacing playlist when “Insert” hotkey is used
Makes warning for "Insert" hotkey consistent with that of "Insert Shuffled hotkey" (both will result in the current playlist being erased if playback is stopped). Change-Id: I7c6a01438c227a963209b8689ee6941b820a004d
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index f8233da92c..8f2c3c4f4a 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -567,8 +567,8 @@ static bool view_playlist(void)
static int playlist_insert_func(void *param)
{
if (((intptr_t)param == PLAYLIST_REPLACE ||
- ((intptr_t)param == PLAYLIST_INSERT_SHUFFLED && !(audio_status() & AUDIO_STATUS_PLAY))) &&
- !warn_on_pl_erase())
+ (((intptr_t)param == PLAYLIST_INSERT_SHUFFLED || (intptr_t)param == PLAYLIST_INSERT)
+ && !(audio_status() & AUDIO_STATUS_PLAY))) && !warn_on_pl_erase())
return 0;
add_to_playlist((intptr_t)param, false);
return 0;