Mercurial > mplayer.hg
changeset 35484:9dceffa5d9b2
Set filename for MPlayer in GUI_PREPARE.
This allows to remove some ugly code from uiEventHandling() (evPlay)
whose sole purpose was setting the global filename variable.
For CD, VCD and DVD this is (indirectly) done in GUI_PREPARE, too,
so do it here for FILE and STREAM as well.
author | ib |
---|---|
date | Mon, 03 Dec 2012 14:10:12 +0000 |
parents | 8ac7761bcb7c |
children | 4d2ebecd1605 |
files | gui/interface.c gui/ui/main.c |
diffstat | 2 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Mon Dec 03 14:04:43 2012 +0000 +++ b/gui/interface.c Mon Dec 03 14:10:12 2012 +0000 @@ -414,6 +414,7 @@ switch (guiInfo.StreamType) { case STREAMTYPE_FILE: case STREAMTYPE_STREAM: + filename = guiInfo.Filename; break; case STREAMTYPE_CDDA:
--- a/gui/ui/main.c Mon Dec 03 14:04:43 2012 +0000 +++ b/gui/ui/main.c Mon Dec 03 14:10:12 2012 +0000 @@ -208,12 +208,6 @@ if ( ( msg == evPlaySwitchToPause )&&( guiInfo.Playing == GUI_PAUSE ) ) goto NoPause; - if ( isPlaylistStreamtype && listMgr( PLAYLIST_ITEM_GET_CURR,0 ) ) - { - plItem * curr = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); - uiSetFile( curr->path,curr->name,SAME_STREAMTYPE ); - } - switch ( guiInfo.StreamType ) { case STREAMTYPE_FILE: