aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/vga.c19
-rw-r--r--hw/vga_int.h2
2 files changed, 21 insertions, 0 deletions
diff --git a/hw/vga.c b/hw/vga.c
index dc8dddec80..f31dbdd652 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1346,6 +1346,7 @@ static void vga_draw_text(VGACommonState *s, int full_update)
s->last_scr_width = width * cw;
s->last_scr_height = height * cheight;
qemu_console_resize(s->ds, s->last_scr_width, s->last_scr_height);
+ dpy_text_resize(s->ds, width, height);
s->last_depth = 0;
s->last_width = width;
s->last_height = height;
@@ -1359,6 +1360,14 @@ static void vga_draw_text(VGACommonState *s, int full_update)
palette = s->last_palette;
x_incr = cw * ((ds_get_bits_per_pixel(s->ds) + 7) >> 3);
+ if (full_update) {
+ s->full_update_text = 1;
+ }
+ if (s->full_update_gfx) {
+ s->full_update_gfx = 0;
+ full_update |= 1;
+ }
+
cursor_offset = ((s->cr[VGA_CRTC_CURSOR_HI] << 8) |
s->cr[VGA_CRTC_CURSOR_LO]) - s->start_addr;
if (cursor_offset != s->cursor_offset ||
@@ -2052,7 +2061,9 @@ static void vga_update_text(void *opaque, console_ch_t *chardata)
cw != s->last_cw || cheight != s->last_ch) {
s->last_scr_width = width * cw;
s->last_scr_height = height * cheight;
+ qemu_console_resize(s->ds, s->last_scr_width, s->last_scr_height);
dpy_text_resize(s->ds, width, height);
+ s->last_depth = 0;
s->last_width = width;
s->last_height = height;
s->last_ch = cheight;
@@ -2060,6 +2071,14 @@ static void vga_update_text(void *opaque, console_ch_t *chardata)
full_update = 1;
}
+ if (full_update) {
+ s->full_update_gfx = 1;
+ }
+ if (s->full_update_text) {
+ s->full_update_text = 0;
+ full_update |= 1;
+ }
+
/* Update "hardware" cursor */
cursor_offset = ((s->cr[VGA_CRTC_CURSOR_HI] << 8) |
s->cr[VGA_CRTC_CURSOR_LO]) - s->start_addr;
diff --git a/hw/vga_int.h b/hw/vga_int.h
index 22f1706adf..d4da777e62 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -154,6 +154,8 @@ typedef struct VGACommonState {
vga_hw_invalidate_ptr invalidate;
vga_hw_screen_dump_ptr screen_dump;
vga_hw_text_update_ptr text_update;
+ bool full_update_text;
+ bool full_update_gfx;
/* hardware mouse cursor support */
uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32];
void (*cursor_invalidate)(struct VGACommonState *s);