Skip to content

Commit

Permalink
Cirrus: Fixed redraw issue caused by misaligned bitblt region.
Browse files Browse the repository at this point in the history
If x0 + width exceeds the screen width, mark tile(s) on the left side of the screen, too.
This should finally fix issue #221.
  • Loading branch information
vruppert committed Jan 17, 2024
1 parent c66d6f1 commit 6770a35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bochs/iodev/display/svga_cirrus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ void bx_svga_cirrus_c::redraw_area(unsigned x0, unsigned y0, unsigned width,
} else {
yt1 = (BX_CIRRUS_THIS svga_yres - 1) / Y_TILESIZE;
}
if ((x0 + width) > svga_xres) {
BX_CIRRUS_THIS redraw_area(0, y0 + 1, width, height);
}
for (yti=yt0; yti<=yt1; yti++) {
for (xti=xt0; xti<=xt1; xti++) {
SET_TILE_UPDATED(BX_CIRRUS_THIS, xti, yti, 1);
Expand Down

0 comments on commit 6770a35

Please sign in to comment.