[MPlayer-cvslog] r37059 - trunk/gui/win32/widgetrender.c

ib subversion at mplayerhq.hu
Mon Mar 24 13:52:02 CET 2014


Author: ib
Date: Mon Mar 24 13:52:01 2014
New Revision: 37059

Log:
Remove unnecessary bounds checks in Win32 GUI.

The checks that the rendered potmeter button
doesn't exceed the bounds is not necessary as
the item value is already limited within the
range of 0 to 100.

Patch by Hans-Dieter Kosch, hdkosch kabelbw de.

Modified:
   trunk/gui/win32/widgetrender.c

Modified: trunk/gui/win32/widgetrender.c
==============================================================================
--- trunk/gui/win32/widgetrender.c	Mon Mar 24 12:09:39 2014	(r37058)
+++ trunk/gui/win32/widgetrender.c	Mon Mar 24 13:52:01 2014	(r37059)
@@ -348,20 +348,12 @@ void renderwidget(skin_t *skin, image *d
             /* repaint the area behind the slider */
             render(skin->desktopbpp, dest, find_background(skin, item), item->wx, item->wy, item->wx, item->wy, item->width, item->wheight, 1);
             item->y = (100 - item->value) * (item->wheight-item->height) / 100 + item->wy;
-            if((item->y + item->height) > (item->wy + item->wheight))
-                item->y = item->wy + item->wheight - item->height;
-            if(item->y < item->wy)
-                item->y = item->wy;
         }
         else
         {
             /* repaint the area behind the slider */
             render(skin->desktopbpp, dest, find_background(skin, item), item->wx, item->wy, item->wx, item->wy, item->wwidth, item->height, 1);
             item->x = item->value * (item->wwidth-item->width) / 100 + item->wx;
-            if((item->x + item->width) > (item->wx + item->wwidth))
-                item->x = item->wx + item->wwidth - item->width;
-            if(item->x < item->wx)
-                item->x = item->wx;
         }
     }
     render(skin->desktopbpp, dest, img, item->x, item->y, 0, y, img->width, height, 1);


More information about the MPlayer-cvslog mailing list