[MPlayer-cvslog] r37099 - trunk/gui/ui/render.c

ib subversion at mplayerhq.hu
Fri Mar 28 13:21:07 CET 2014


Author: ib
Date: Fri Mar 28 13:21:07 2014
New Revision: 37099

Log:
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.

Modified:
   trunk/gui/ui/render.c

Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c	Fri Mar 28 13:14:15 2014	(r37098)
+++ trunk/gui/ui/render.c	Fri Mar 28 13:21:07 2014	(r37099)
@@ -429,7 +429,7 @@ void RenderAll(wsWindow *window, guiItem
 
         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;
 


More information about the MPlayer-cvslog mailing list