changeset 799:13483b855058

Fix subsong control window problems during pause state.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 07 Nov 2012 11:26:31 +0200
parents 4c5b695fd85e
children 1fe6005ed58c
files src/xmms-sid.c src/xs_player.h
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmms-sid.c	Wed Nov 07 11:24:29 2012 +0200
+++ b/src/xmms-sid.c	Wed Nov 07 11:26:31 2012 +0200
@@ -636,7 +636,7 @@
 void xs_pause(short pause)
 {
     XS_MUTEX_LOCK(xs_status);
-    /* FIXME FIX ME todo: pause should disable sub-tune controls */
+    xs_status.paused = pause;
     XS_MUTEX_UNLOCK(xs_status);
 
     xs_subctrl_close();
@@ -655,7 +655,7 @@
     XS_MUTEX_LOCK(xs_status);
     XS_MUTEX_LOCK(xs_subctrl);
 
-    if (xs_status.tuneInfo && xs_status.playing)
+    if (!xs_status.paused && xs_status.tuneInfo && xs_status.playing)
     {
         n = (gint) GTK_ADJUSTMENT(xs_subctrl_adj)->value;
         if (n >= 1 && n <= xs_status.tuneInfo->nsubTunes)
@@ -671,7 +671,7 @@
 {
     XS_MUTEX_LOCK(xs_status);
 
-    if (xs_status.tuneInfo && xs_status.playing)
+    if (!xs_status.paused && xs_status.tuneInfo && xs_status.playing)
     {
         if (xs_status.currSong > 1)
             xs_status.currSong--;
@@ -687,7 +687,7 @@
 {
     XS_MUTEX_LOCK(xs_status);
 
-    if (xs_status.tuneInfo && xs_status.playing)
+    if (!xs_status.paused && xs_status.tuneInfo && xs_status.playing)
     {
         if (xs_status.currSong < xs_status.tuneInfo->nsubTunes)
             xs_status.currSong++;
@@ -709,7 +709,7 @@
     /* Check if control window exists, we are currently playing and have a tune */
     if (xs_subctrl)
     {
-        if (xs_status.tuneInfo && xs_status.playing)
+        if (!xs_status.paused && xs_status.tuneInfo && xs_status.playing)
         {
             tmpAdj = GTK_ADJUSTMENT(xs_subctrl_adj);
 
--- a/src/xs_player.h	Wed Nov 07 11:24:29 2012 +0200
+++ b/src/xs_player.h	Wed Nov 07 11:26:31 2012 +0200
@@ -33,7 +33,8 @@
     void        *internal;         /* SID-emulation internal engine data */
     XSEngine    *engine;           /* Selected player engine */
     gboolean    error,
-                playing;
+                playing,
+                paused;
     gint        currSong,          /* Current sub-tune */
                 lastTime;