[MPlayer-cvslog] r35633 - trunk/gui/ui/main.c
ib
subversion at mplayerhq.hu
Sun Dec 9 13:33:01 CET 2012
Author: ib
Date: Sun Dec 9 13:33:00 2012
New Revision: 35633
Log:
Fix bug with evSetBalance.
Calculation was wrong, resulting in a strangely acting GUI item.
Moreover, the wrong OSD was displayed.
Modified:
trunk/gui/ui/main.c
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Sun Dec 9 13:31:32 2012 (r35632)
+++ trunk/gui/ui/main.c Sun Dec 9 13:33:00 2012 (r35633)
@@ -287,10 +287,6 @@ NoPause:
case evSetVolume:
guiInfo.Volume=param;
- goto set_volume;
- case evSetBalance:
- guiInfo.Balance=param;
-set_volume:
{
float l = guiInfo.Volume * ( ( 100.0 - guiInfo.Balance ) / 50.0 );
float r = guiInfo.Volume * ( ( guiInfo.Balance ) / 50.0 );
@@ -308,6 +304,17 @@ set_volume:
}
break;
+ case evSetBalance:
+ guiInfo.Balance=param;
+ mixer_setbalance( mixer,(guiInfo.Balance - 50.0 ) / 50.0 );
+ if ( osd_level )
+ {
+ osd_visible=(GetTimerMS() + 1000) | 1;
+ vo_osd_progbar_type=OSD_BALANCE;
+ vo_osd_progbar_value=( ( guiInfo.Balance ) * 256.0 ) / 100.0;
+ vo_osd_changed( OSDTYPE_PROGBAR );
+ }
+ break;
case evMenu:
/*if (guiApp.menuIsPresent) NOTE TO MYSELF: Uncomment only after mouse
More information about the MPlayer-cvslog
mailing list