changeset 36944:6dab81ea03c3

Remove pointless condition. It's always true. As a result, relocate the variable declarations.
author ib
date Sat, 22 Mar 2014 19:47:44 +0000
parents 4321338b4e8b
children 22750a12bdc7
files gui/interface.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Sat Mar 22 19:45:06 2014 +0000
+++ b/gui/interface.c	Sat Mar 22 19:47:44 2014 +0000
@@ -317,6 +317,7 @@
  */
 int gui(int what, void *data)
 {
+    static float last_balance = 50.0f;
 #ifdef CONFIG_DVDREAD
     dvd_priv_t *dvd;
 #endif
@@ -324,6 +325,7 @@
     stream_t *stream = NULL;
     sh_audio_t *sh_audio;
     mixer_t *mixer;
+    float l, r, b;
     plItem *next = NULL;
 
     switch (what) {
@@ -738,10 +740,6 @@
 
         mixer = data;
 
-        if (mixer) {
-            float l, r, b;
-            static float last_balance = 50.0f;
-
             mixer_getvolume(mixer, &l, &r);
             guiInfo.Volume = FFMAX(l, r);
 
@@ -752,7 +750,6 @@
                 uiEvent(ivSetVolume, guiInfo.Volume);
                 last_balance = guiInfo.Balance;
             }
-        }
 
         break;