Mercurial > mplayer.hg
diff gui/interface.c @ 34664:4df4d842d5fb
Remove global variable pointing to current playlist item.
Instead, use the listMgr command to get it.
author | ib |
---|---|
date | Tue, 21 Feb 2012 19:44:21 +0000 |
parents | 73a5ecb53ee2 |
children | 7c447e9db447 |
line wrap: on
line diff
--- a/gui/interface.c Tue Feb 21 18:55:14 2012 +0000 +++ b/gui/interface.c Tue Feb 21 19:44:21 2012 +0000 @@ -68,6 +68,7 @@ void guiInit(void) { int i; + plItem *playlist; mp_msg(MSGT_GPLAYER, MSGL_V, "GUI init.\n"); @@ -233,8 +234,10 @@ uiSubRender = 1; - if (plCurrent && !filename) { - uiSetFileName(plCurrent->path, plCurrent->name, STREAMTYPE_FILE); + playlist = listMgr(PLAYLIST_ITEM_GET_CURR, 0); + + if (playlist && !filename) { + uiSetFileName(playlist->path, playlist->name, STREAMTYPE_FILE); filename = NULL; // don't start playing }