# HG changeset patch # User pontscho # Date 999467361 0 # Node ID 8ce1c088d05d396684d1cdc09eece874008f1b51 # Parent 773ae4ba43f5b719a16d676e99cf6a2b6ab1657f fix osd volume bar handling in gui diff -r 773ae4ba43f5 -r 8ce1c088d05d Gui/mplayer/mw.h --- a/Gui/mplayer/mw.h Sun Sep 02 21:26:51 2001 +0000 +++ b/Gui/mplayer/mw.h Sun Sep 02 21:49:21 2001 +0000 @@ -435,7 +435,6 @@ mplMainRender=1; SelectedButton=i; boxMoved=0; - if ( ( item->msg == evSetVolume )||( item->msg == evSetBalance ) ) mplShMem->VolumeChanged=1; msButton=itPotmeter; itemtype=itPotmeter; } @@ -450,7 +449,6 @@ mplMainRender=1; SelectedButton=i; boxMoved=0; - if ( ( item->msg == evSetVolume )||( item->msg == evSetBalance ) ) mplShMem->VolumeChanged=1; msButton=itHPotmeter; itemtype=itHPotmeter; } @@ -478,7 +476,11 @@ potihandled: if ( item->value > 100.0f ) item->value=100.0f; if ( item->value < 0.0f ) item->value=0.0f; -// if ( ( item->msg == evSetVolume )||( item->msg == evSetBalance ) ) + if ( ( item->msg == evSetVolume )||( item->msg == evSetBalance ) ) + { + mplShMem->VolumeChanged=1; + mplShMem->Volume=item->value; + } mplMsgHandle( item->msg,item->value ); mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow ); break; @@ -500,6 +502,11 @@ case itHPotmeter: item->used=0; btnModify( item->msg,(float)( X - item->x ) / item->width * 100.0f ); + if ( ( item->msg == evSetVolume )||( item->msg == evSetBalance ) ) + { + mplShMem->VolumeChanged=1; + mplShMem->Volume=item->value; + } value=item->value; break; } diff -r 773ae4ba43f5 -r 8ce1c088d05d mplayer.c --- a/mplayer.c Sun Sep 02 21:26:51 2001 +0000 +++ b/mplayer.c Sun Sep 02 21:49:21 2001 +0000 @@ -1792,6 +1792,16 @@ // printf("mplShMem->Playing=%d \n",mplShMem->Playing); if(mplShMem->Playing==0) break; // STOP if(mplShMem->Playing==2) osd_function=OSD_PAUSE; +#ifdef USE_OSD + if ( ( osd_level )&&( mplShMem->VolumeChanged ) ) + { + osd_visible=sh_video->fps; // 1 sec + vo_osd_progbar_type=OSD_VOLUME; + vo_osd_progbar_value=((mplShMem->Volume )*256.0)/100.0; + } +#endif + mixer_setvolume( mplShMem->Volume,mplShMem->Volume ); + mplShMem->VolumeChanged=0; } #endif