[MPlayer-dev-eng] [PATCH] GUI: Implement a true rotary potmeter

Hans-Dieter Kosch hdkosch at kabelbw.de
Fri Apr 4 02:05:20 CEST 2014


Ingo Brückl wrote:

> I wrote on Thu, 03 Apr 2014 08:59:47 +0200:
> 
>> I'm going to make some source changes now in order to prepare it.
> 
> Here is an elaborated version of the patch working in radian now which saves
> some operations and makes it easier to understand (e.g. when looking up atan2
> and radian in the wiki).

> Comments?

 > +                 if ( point <= item->arclength ) value=100.0 * point / 
item->arclength;
 > +                 else if ( point < item->arclength / 2.0 + M_PI ) value=100.0f;
 > +                 else value=0.0f;

Now, since we have 'constraint()', wouldn't be this sufficient:

                     value=100.0 * point / item->arclength;

(As said, more on weekend...)

Hans-Dieter


More information about the MPlayer-dev-eng mailing list