changeset 35791:eda12497788f

Fix bug with evPlay. evPlay must restart the current track when already playing (not the next one) and continue playing from the current position when paused. Based on a patch by Hans-Dieter Kosch, hdkosch kabelbw de.
author ib
date Fri, 25 Jan 2013 15:54:57 +0000
parents f229582bf4e5
children 97a4f5644b74
files gui/ui/actions.c
diffstat 1 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/actions.c	Fri Jan 25 15:42:36 2013 +0000
+++ b/gui/ui/actions.c	Fri Jan 25 15:54:57 2013 +0000
@@ -178,9 +178,7 @@
     case evPlaySwitchToPause:
 play:
 
-        if ((ev == evPlaySwitchToPause) && (guiInfo.Playing == GUI_PAUSE))
-            goto NoPause;
-
+        if (guiInfo.Playing != GUI_PAUSE) {
         MediumPrepare(guiInfo.StreamType);
 
         switch (guiInfo.StreamType) {
@@ -192,48 +190,44 @@
                 guiInfo.Track = 1;
 
             guiInfo.NewPlay = GUI_FILE_NEW;
+            guiInfo.PlaylistNext = !guiInfo.Playing;
+
             break;
 
         case STREAMTYPE_CDDA:
 
-            if (guiInfo.Playing != GUI_PAUSE) {
                 if (!guiInfo.Track)
                     guiInfo.Track = 1;
 
                 guiInfo.NewPlay = GUI_FILE_SAME;
-            }
 
             break;
 
         case STREAMTYPE_VCD:
 
-            if (guiInfo.Playing != GUI_PAUSE) {
                 if (!guiInfo.Track)
                     guiInfo.Track = 2;
 
                 guiInfo.NewPlay = GUI_FILE_SAME;
-            }
 
             break;
 
         case STREAMTYPE_DVD:
 
-            if (guiInfo.Playing != GUI_PAUSE) {
                 if (!guiInfo.Track)
                     guiInfo.Track = 1;
 
                 guiInfo.NewPlay = GUI_FILE_SAME;
-            }
 
             break;
         }
+        }
 
         uiPlay();
         break;
 
     case evPause:
     case evPauseSwitchToPlay:
-NoPause:
         uiPause();
         break;