Mercurial > mplayer.hg
changeset 37003:2d8157b3b386
Fix the index passed to PutImage() for item type itVPotmeter.
Unlike the position for drawing the button (from bottom to top), the
index for the phase image has to be in the usual range, i.e. 0 for 0%
and numphases - 1 for 100%, so that the phase image can be designed
straightforwardly.
Fix the parameter although PutImage() currently doesn't work for item
type itVPotmeter at all.
author | ib |
---|---|
date | Fri, 28 Mar 2014 12:21:07 +0000 |
parents | 9402cbe067c8 |
children | c3fcf359e4dc |
files | gui/ui/render.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/ui/render.c Fri Mar 28 12:14:15 2014 +0000 +++ b/gui/ui/render.c Fri Mar 28 12:21:07 2014 +0000 @@ -429,7 +429,7 @@ case itVPotmeter: - PutImage(&item->Bitmap, item->x, item->y, item->numphases, item->numphases * (1.0 - item->value / 100.0)); + PutImage(&item->Bitmap, item->x, item->y, item->numphases, (item->numphases - 1) * (item->value / 100.0)); PutImage(&item->Mask, item->x, item->y + (item->height - item->pheight) * (1.0 - item->value / 100.0), 3, index); break;