From 26a9c4fa07e1b511355d54e4d232ec99704f099f Mon Sep 17 00:00:00 2001 From: Chris Young Date: Wed, 11 Feb 2015 18:24:51 +0000 Subject: Avoid RectFilling a 0 size area --- amiga/gui.c | 4 ++-- amiga/plotters.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'amiga') diff --git a/amiga/gui.c b/amiga/gui.c index ed7327951..de78977be 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -4036,7 +4036,7 @@ gui_window_create(struct browser_window *bw, g->shared->objects[GID_STATUS] = NewObject( NULL, - "frbuttonclass", + "frbuttonclass", /**\todo find appropriate class which works on OS3 */ GA_ID, GID_STATUS, GA_Left, scrn->WBorLeft + 2, GA_RelBottom, -((2 + height + scrn->WBorBottom - scrn->RastPort.TxHeight)/2), @@ -4662,7 +4662,7 @@ static void ami_do_redraw(struct gui_window_2 *gwin) { #ifndef __amigaos4__ /* Try to avoid some overprinting - might need glob->rp clearing instead */ - ami_plot_clear_bbox(gwin->win->RPort, bbox); + ami_plot_clear_bbox(&browserglob.rp, bbox); #endif ami_do_redraw_tiled(gwin, true, hcurrent, vcurrent, width, height, hcurrent, vcurrent, bbox, &ctx); } diff --git a/amiga/plotters.c b/amiga/plotters.c index 9455d1cde..f12bff3c5 100644 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -264,6 +264,8 @@ static void ami_plot_setopen(struct RastPort *rp, ULONG colr) void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox) { + if((bbox->Width == 0) || (bbox->Height == 0)) return; + ami_plot_setapen(rp, 0xffffffff); RectFill(rp, bbox->Left, bbox->Top, bbox->Width+bbox->Left, bbox->Height+bbox->Top); -- cgit v1.2.3