summaryrefslogtreecommitdiff
path: root/riscos/gui/progress_bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'riscos/gui/progress_bar.c')
-rw-r--r--riscos/gui/progress_bar.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/riscos/gui/progress_bar.c b/riscos/gui/progress_bar.c
index 8de19540b..cd4b08929 100644
--- a/riscos/gui/progress_bar.c
+++ b/riscos/gui/progress_bar.c
@@ -399,9 +399,8 @@ void ro_gui_progress_bar_animate(void *p)
void ro_gui_progress_bar_calculate(struct progress_bar *pb, int width,
int height)
{
- os_error *error;
int icon_width, icon_height;
- int icon_x0 = 0, icon_y0 = 0, progress_x0, progress_x1, progress_ymid = 0;
+ int icon_x0 = 0, icon_y0 = 0, progress_x0, progress_x1;
osspriteop_header *icon = NULL;
bool icon_redraw = false;
@@ -422,7 +421,8 @@ void ro_gui_progress_bar_calculate(struct progress_bar *pb, int width,
/* get the icon information */
if (progress_bar_definition.sprite_area != wimpspriteop_AREA) {
- progress_ymid = height / 2;
+ int progress_ymid = height / 2;
+ os_error *error;
error = xosspriteop_read_sprite_info(osspriteop_USER_AREA,
progress_bar_definition.sprite_area,
(osspriteop_id)pb->icon,
@@ -474,7 +474,6 @@ void ro_gui_progress_bar_calculate(struct progress_bar *pb, int width,
void ro_gui_progress_bar_redraw_window(wimp_draw *redraw,
struct progress_bar *pb)
{
- os_error *error;
osbool more = true;
struct rect clip;
int progress_ymid;
@@ -491,6 +490,7 @@ void ro_gui_progress_bar_redraw_window(wimp_draw *redraw,
/* redraw the window */
while (more) {
+ os_error *error;
if (pb->icon)
_swix(Tinct_PlotAlpha, _IN(2) | _IN(3) | _IN(4) | _IN(7),
pb->icon_img,