From ddc392e2b465c02bb72fc5a411bd94842f905ddc Mon Sep 17 00:00:00 2001 From: vayne Date: Mon, 9 Oct 2006 18:21:50 +0000 Subject: fixed a crash bug as a result of the last change, as well as file skipping (hopefully) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20137 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Gui/win32/dialogs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Gui/win32/dialogs.c b/Gui/win32/dialogs.c index ebd5e3822a..4f662c3b40 100644 --- a/Gui/win32/dialogs.c +++ b/Gui/win32/dialogs.c @@ -531,9 +531,9 @@ static LRESULT CALLBACK PlayListWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPA case ID_TRACKLIST: if(HIWORD(wParam) == LBN_DBLCLK) { - if(guiIntfStruct.Playing && selected) - pl->current = selected - 2; - else if(selected) pl->current = selected - 1; + if(selected) pl->current = selected - 1; + mplSetFileName(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_STREAM); + mplGotoTheNext = 0; gui->startplay(gui); } return 0; @@ -552,6 +552,7 @@ static LRESULT CALLBACK PlayListWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPA case ID_PLAY: { if(selected) pl->current = selected - 1; + mplSetFileName(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_STREAM); mplGotoTheNext = 0; gui->startplay(gui); break; -- cgit v1.2.3