Fix memory dirty getting API change fallout
Fix confusion in length calculation in commit
cd7a45c95e
.
Reported-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
57c83dacfe
commit
d1f3dd343c
|
@ -87,7 +87,7 @@ void framebuffer_update_display(
|
||||||
dest += i * dest_row_pitch;
|
dest += i * dest_row_pitch;
|
||||||
|
|
||||||
for (; i < rows; i++) {
|
for (; i < rows; i++) {
|
||||||
dirty = memory_region_get_dirty(mem, addr, addr + src_width,
|
dirty = memory_region_get_dirty(mem, addr, src_width,
|
||||||
DIRTY_MEMORY_VGA);
|
DIRTY_MEMORY_VGA);
|
||||||
if (dirty || invalidate) {
|
if (dirty || invalidate) {
|
||||||
fn(opaque, dest, src, cols, dest_col_pitch);
|
fn(opaque, dest, src, cols, dest_col_pitch);
|
||||||
|
|
|
@ -1327,8 +1327,8 @@ static void sm501_draw_crt(SM501State * s)
|
||||||
ram_addr_t page1 = offset + width * src_bpp - 1;
|
ram_addr_t page1 = offset + width * src_bpp - 1;
|
||||||
|
|
||||||
/* check dirty flags for each line */
|
/* check dirty flags for each line */
|
||||||
update = memory_region_get_dirty(&s->local_mem_region, page0, page1,
|
update = memory_region_get_dirty(&s->local_mem_region, page0,
|
||||||
DIRTY_MEMORY_VGA);
|
page1 - page0, DIRTY_MEMORY_VGA);
|
||||||
|
|
||||||
/* draw line and change status */
|
/* draw line and change status */
|
||||||
if (update) {
|
if (update) {
|
||||||
|
|
2
hw/vga.c
2
hw/vga.c
|
@ -1779,7 +1779,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
|
||||||
}
|
}
|
||||||
page0 = addr;
|
page0 = addr;
|
||||||
page1 = addr + bwidth - 1;
|
page1 = addr + bwidth - 1;
|
||||||
update = memory_region_get_dirty(&s->vram, page0, page1,
|
update = memory_region_get_dirty(&s->vram, page0, page1 - page0,
|
||||||
DIRTY_MEMORY_VGA);
|
DIRTY_MEMORY_VGA);
|
||||||
/* explicit invalidation for the hardware cursor */
|
/* explicit invalidation for the hardware cursor */
|
||||||
update |= (s->invalidated_y_table[y >> 5] >> (y & 0x1f)) & 1;
|
update |= (s->invalidated_y_table[y >> 5] >> (y & 0x1f)) & 1;
|
||||||
|
|
Loading…
Reference in New Issue