# HG changeset patch # User ib # Date 1359129297 0 # Node ID eda12497788feeaa90a130759833fda5035cedd5 # Parent f229582bf4e5c40416a08ce1cb66331f84eb090d 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. diff -r f229582bf4e5 -r eda12497788f gui/ui/actions.c --- 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;