summaryrefslogtreecommitdiffstats
path: root/Gui/mplayer/mw.c
diff options
context:
space:
mode:
Diffstat (limited to 'Gui/mplayer/mw.c')
-rw-r--r--Gui/mplayer/mw.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Gui/mplayer/mw.c b/Gui/mplayer/mw.c
index b87cba41fa..6a31222af7 100644
--- a/Gui/mplayer/mw.c
+++ b/Gui/mplayer/mw.c
@@ -432,12 +432,16 @@ void mplMainMouseHandle( 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 );
itemtype=0;
@@ -476,7 +480,7 @@ rollerhandled:
item->value=(float)( X - item->x ) / item->width * 100.0f;
goto potihandled;
case itVPotmeter:
- item->value=(float)( Y - item->y ) / item->height * 100.0f;
+ 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;