vga: stop direct access to DisplaySurface fields.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
b6e9f63711
commit
1fd2510a37
9
hw/vga.c
9
hw/vga.c
@ -1709,8 +1709,13 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
|
|||||||
s->last_depth = depth;
|
s->last_depth = depth;
|
||||||
full_update = 1;
|
full_update = 1;
|
||||||
} else if (is_buffer_shared(s->ds->surface) &&
|
} else if (is_buffer_shared(s->ds->surface) &&
|
||||||
(full_update || s->ds->surface->data != s->vram_ptr + (s->start_addr * 4))) {
|
(full_update || ds_get_data(s->ds) != s->vram_ptr
|
||||||
s->ds->surface->data = s->vram_ptr + (s->start_addr * 4);
|
+ (s->start_addr * 4))) {
|
||||||
|
qemu_free_displaysurface(s->ds);
|
||||||
|
s->ds->surface = qemu_create_displaysurface_from(disp_width,
|
||||||
|
height, depth,
|
||||||
|
s->line_offset,
|
||||||
|
s->vram_ptr + (s->start_addr * 4));
|
||||||
dpy_gfx_setdata(s->ds);
|
dpy_gfx_setdata(s->ds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user