diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h index d24b8bd443..10d686ca52 100644 --- a/Gui/mplayer/mw.h +++ b/Gui/mplayer/mw.h @@ -435,7 +435,6 @@ void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY ) mplMainRender=1; SelectedButton=i; boxMoved=0; - if ( ( item->msg == evSetVolume )||( item->msg == evSetBalance ) ) mplShMem->VolumeChanged=1; msButton=itPotmeter; itemtype=itPotmeter; } @@ -450,7 +449,6 @@ void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY ) mplMainRender=1; SelectedButton=i; boxMoved=0; - if ( ( item->msg == evSetVolume )||( item->msg == evSetBalance ) ) mplShMem->VolumeChanged=1; msButton=itHPotmeter; itemtype=itHPotmeter; } @@ -478,7 +476,11 @@ void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY ) 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 @@ potihandled: 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 --git a/mplayer.c b/mplayer.c index 023573f3dd..ed074f533d 100644 --- a/mplayer.c +++ b/mplayer.c @@ -1792,6 +1792,16 @@ if(rel_seek_secs || abs_seek_pos){ // 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