提交 543c4c94 编写于 作者: A Aurelien Jarno

sm501: fix screen redraw

Due to signed/unsigned comparison, the dirty bits are never reset, and
the screen redrawn each time. Fix that by only using ram_addr_t types,
and looking for page_min != addr_max instead.
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 b6469683
......@@ -1274,8 +1274,8 @@ static void sm501_draw_crt(SM501State * s)
draw_hwc_line_func * draw_hwc_line = NULL;
int full_update = 0;
int y_start = -1;
int page_min = 0x7fffffff;
int page_max = -1;
ram_addr_t page_min = ~0l;
ram_addr_t page_max = 0l;
ram_addr_t offset = s->local_mem_offset;
/* choose draw_line function */
......@@ -1371,9 +1371,10 @@ static void sm501_draw_crt(SM501State * s)
dpy_update(s->ds, 0, y_start, width, y - y_start);
/* clear dirty flags */
if (page_max != -1)
if (page_min != ~0l) {
cpu_physical_memory_reset_dirty(page_min, page_max + TARGET_PAGE_SIZE,
VGA_DIRTY_FLAG);
}
}
static void sm501_update_display(void *opaque)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册