# HG changeset patch # User ib # Date 1395665521 0 # Node ID e539d330c7beeb2683dd70cd60c2066ea560a311 # Parent 6bb8d4f4a7b04141a01252bbe36180f38af241a4 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. diff -r 6bb8d4f4a7b0 -r e539d330c7be gui/win32/widgetrender.c --- a/gui/win32/widgetrender.c Mon Mar 24 11:09:39 2014 +0000 +++ b/gui/win32/widgetrender.c Mon Mar 24 12:52:01 2014 +0000 @@ -348,20 +348,12 @@ /* 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);