diff options
Diffstat (limited to 'Gui/mplayer/pb.c')
-rw-r--r-- | Gui/mplayer/pb.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Gui/mplayer/pb.c b/Gui/mplayer/pb.c index ead422a7f4..69a3734509 100644 --- a/Gui/mplayer/pb.c +++ b/Gui/mplayer/pb.c @@ -154,12 +154,16 @@ void mplPBMouseHandle( int Button,int X,int Y,int RX,int RY ) switch( itemtype ) { case itPotmeter: - case itVPotmeter: case itHPotmeter: btnModify( item->msg,(float)( X - item->x ) / item->width * 100.0f ); mplEventHandling( item->msg,item->value ); value=item->value; break; + case itVPotmeter: + btnModify( item->msg, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f ); + mplEventHandling( item->msg,item->value ); + value=item->value; + break; } mplEventHandling( item->msg,value ); @@ -188,6 +192,9 @@ rollerhandled: case itPotmeter: item->value=(float)( X - item->x ) / item->width * 100.0f; goto potihandled; + case itVPotmeter: + item->value=(1. - (float)( Y - item->y ) / item->height) * 100.0f; + goto potihandled; case itHPotmeter: item->value=(float)( X - item->x ) / item->width * 100.0f; potihandled: |