# HG changeset patch # User ib # Date 1329917262 0 # Node ID 697aaedfe59e7822ea0a268452392d733c972e83 # Parent 00e8aecfa7ff46bd8b24f95e93ce31e5055cb14b Remove global variable pointing to playlist item last played. The variable and the condition it is used for are pointless, because it isn't possible to insert an playlist item before the current one without rebuilding the whole list which would invalidate this pointer. diff -r 00e8aecfa7ff -r 697aaedfe59e gui/interface.c --- a/gui/interface.c Wed Feb 22 10:53:00 2012 +0000 +++ b/gui/interface.c Wed Feb 22 13:27:42 2012 +0000 @@ -772,8 +772,9 @@ break; } - if (guiInfo.Playing && (next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0)) && (plLastPlayed != next)) { - plLastPlayed = next; + next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0); + + if (guiInfo.Playing && next) { uiSetFileName(next->path, next->name, STREAMTYPE_FILE); guiInfo.NewPlay = GUI_FILE_NEW; guiInfo.Track++; diff -r 00e8aecfa7ff -r 697aaedfe59e gui/ui/main.c --- a/gui/ui/main.c Wed Feb 22 10:53:00 2012 +0000 +++ b/gui/ui/main.c Wed Feb 22 13:27:42 2012 +0000 @@ -211,7 +211,6 @@ if ( listMgr( PLAYLIST_ITEM_GET_CURR,0 ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) ) { plItem * next = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); - plLastPlayed=next; uiSetFileName( next->path,next->name,SAME_STREAMTYPE ); } diff -r 00e8aecfa7ff -r 697aaedfe59e gui/util/list.c --- a/gui/util/list.c Wed Feb 22 10:53:00 2012 +0000 +++ b/gui/util/list.c Wed Feb 22 13:27:42 2012 +0000 @@ -24,7 +24,6 @@ static plItem *plList; static plItem *plCurrent; -plItem *plLastPlayed; static urlItem *urlList; diff -r 00e8aecfa7ff -r 697aaedfe59e gui/util/list.h --- a/gui/util/list.h Wed Feb 22 10:53:00 2012 +0000 +++ b/gui/util/list.h Wed Feb 22 13:27:42 2012 +0000 @@ -46,8 +46,6 @@ struct urlItem *next; } urlItem; -extern plItem *plLastPlayed; - /// @name list manager (playlist, URL list) void *listMgr(int cmd, void *data);