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

Hans-Dieter Kosch hdkosch at kabelbw.de
Tue Mar 18 02:03:28 CET 2014


Ingo Brückl wrote:

> Hans-Dieter Kosch wrote on Sun, 16 Feb 2014 23:09:01 +0100:
> 
>> Attached patch implements a true rotary pot.
> 
> Please apply rpotmeter.patch, implement the "/* !!! */" (add code or remove
> it if not necessary) and post this diff of yours then.

Great! However, I'm somewhat out of time at the moment, hope to manage it next 
weekend.

At this point, I came across 2 issues:

1) If numphases == 1, hpotmeter gets its phase image drawn partially according 
to the percentage of the value to be displayed (SinglePhasePutImage), while 
vpotmeter gets it always fully drawn. How to cope with this inconsistency?

2) If numphases == 0, we get a division by zero in the rendering (PutImage). 
Should this be trapped?

Just an idea: Treat numphases = 0 like numphases = 1, but handle it as special 
case to give the hpotmeter an always full phase image; admittedly, a bad hack 
for backward compatibility.

Hans-Dieter


More information about the MPlayer-dev-eng mailing list