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

Ingo Brückl ib at wupperonline.de
Fri Apr 4 09:23:54 CEST 2014


Hans-Dieter Kosch wrote on Fri, 04 Apr 2014 02:05:20 +0200:

> Ingo Brückl wrote:

>> 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;

I don't think so. The elses handle the gap and a click near the 0% inside the
gap must return 0.

Ingo


More information about the MPlayer-dev-eng mailing list