summaryrefslogtreecommitdiffstats
path: root/Gui/mplayer/mw.c
diff options
context:
space:
mode:
authorods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-27 19:21:04 +0000
committerods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-27 19:21:04 +0000
commit2e4aba523e1e977ac0c7f57c1989d91fe34fde99 (patch)
treea1a3f6c9da0870aaaf4c17794747280cb33522f0 /Gui/mplayer/mw.c
parentb65d8349426e1819677f23d632a0b902a9549415 (diff)
downloadmpv-2e4aba523e1e977ac0c7f57c1989d91fe34fde99.tar.bz2
mpv-2e4aba523e1e977ac0c7f57c1989d91fe34fde99.tar.xz
vpotmeter fix, scroll in the correct direction
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17255 b3059339-0415-0410-9bf9-f77b7e298cf2
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;