changeset 36954:44dcc6c54014

Disable balance control if number of audio channels is too small.
author ib
date Sun, 23 Mar 2014 12:42:53 +0000
parents 63449be2a903
children d1ece1312aaa
files gui/interface.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Sun Mar 23 12:34:31 2014 +0000
+++ b/gui/interface.c	Sun Mar 23 12:42:53 2014 +0000
@@ -700,6 +700,9 @@
 
         guiInfo.AudioChannels = sh_audio ? sh_audio->channels : 0;
 
+        if (guiInfo.AudioChannels < 2)
+            btnSet(evSetBalance, btnDisabled);
+
         if (sh_audio && !guiInfo.sh_video) {
             guiInfo.VideoWindow = False;
             guiInfo.VideoWidth  = 0;
@@ -784,6 +787,8 @@
 
         guiInfo.sh_video = NULL;
 
+        btnSet(evSetBalance, btnReleased);
+
         uiEvent(ivRedraw, True);
 
         if (guiInfo.Playing) {