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
This commit is contained in:
vayne 2006-10-09 18:21:50 +00:00
parent 37f549101b
commit ddc392e2b4
1 changed files with 4 additions and 3 deletions

View File

@ -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;