changeset 20131:a16eef9ffef6

fixed a crash bug as a result of the last change, as well as file skipping (hopefully)
author vayne
date Mon, 09 Oct 2006 18:21:50 +0000
parents b5c68feff55c
children a8aa764559fa
files Gui/win32/dialogs.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/win32/dialogs.c	Mon Oct 09 18:00:54 2006 +0000
+++ b/Gui/win32/dialogs.c	Mon Oct 09 18:21:50 2006 +0000
@@ -531,9 +531,9 @@
                 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 @@
                 case ID_PLAY:
                 {
                     if(selected) pl->current = selected - 1;
+                        mplSetFileName(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_STREAM);
                     mplGotoTheNext = 0;
                     gui->startplay(gui);
                     break;