From c5aca9d8cecd256d957c551229be2b6856875e25 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 25 Apr 2021 21:07:15 +0100 Subject: RISC OS: Fix EX0 EY0 rendering glitches when scrolling. --- frontends/riscos/corewindow.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'frontends/riscos/corewindow.c') diff --git a/frontends/riscos/corewindow.c b/frontends/riscos/corewindow.c index 2ef05da29..921671217 100644 --- a/frontends/riscos/corewindow.c +++ b/frontends/riscos/corewindow.c @@ -120,10 +120,15 @@ static void ro_cw_redraw(wimp_draw *redraw) origin_x = redraw->box.x0 - redraw->xscroll; origin_y = redraw->box.y1 + ro_cw->origin_y - redraw->yscroll; - r.x0 = (redraw->clip.x0 - origin_x) / 2; - r.y0 = (origin_y - redraw->clip.y1) / 2; - r.x1 = r.x0 + ((redraw->clip.x1 - redraw->clip.x0) / 2); - r.y1 = r.y0 + ((redraw->clip.y1 - redraw->clip.y0) / 2); + ro_plot_clip_rect.x0 = redraw->clip.x0 - origin_x; + ro_plot_clip_rect.y0 = origin_y - redraw->clip.y0; + ro_plot_clip_rect.x1 = redraw->clip.x1 - origin_x; + ro_plot_clip_rect.y1 = origin_y - redraw->clip.y1; + + r.x0 = (ro_plot_clip_rect.x0 ) / 2; /* left */ + r.y0 = (ro_plot_clip_rect.y1 ) / 2; /* top */ + r.x1 = (ro_plot_clip_rect.x1 + 1) / 2; /* right */ + r.y1 = (ro_plot_clip_rect.y0 + 1) / 2; /* bottom */ /* call the draw callback */ ro_cw->draw(ro_cw, origin_x, origin_y, &r); -- cgit v1.2.3