@@ -126,7 +126,8 @@ struct TC6393xbState {
uint32_t scr_width, scr_height; /* in pixels */
qemu_irq l3v;
unsigned blank : 1,
- blanked : 1;
+ blanked : 1,
+ invalidated : 1;
};
qemu_irq *tc6393xb_gpio_in_get(TC6393xbState *s)
@@ -483,7 +484,9 @@ static void tc6393xb_update_display(void *opaque)
s->blanked = s->blank;
full_update = 1;
}
- if (s->scr_width != ds_get_width(s->ds) || s->scr_height != ds_get_height(s->ds)) {
+ if (s->scr_width != ds_get_width(s->ds) ||
+ s->scr_height != ds_get_height(s->ds) ||
+ s->invalidated) {
qemu_console_resize(s->ds, s->scr_width, s->scr_height);
full_update = 1;
}
@@ -491,6 +494,14 @@ static void tc6393xb_update_display(void *opaque)
tc6393xb_draw_blank(s, full_update);
else
tc6393xb_draw_graphic(s, full_update);
+
+ s->invalidated = 0;
+}
+
+static void tc6393xb_invalidate_display(void *opaque)
+{
+ TC6393xbState *s = opaque;
+ s->invalidated = 1;
}
@@ -598,7 +609,7 @@ TC6393xbState *tc6393xb_init(uint32_t base, qemu_irq irq)
s->scr_width = 480;
s->scr_height = 640;
s->ds = graphic_console_init(tc6393xb_update_display,
- NULL, /* invalidate */
+ tc6393xb_invalidate_display, /* invalidate */
NULL, /* screen_dump */
NULL, /* text_update */
s);
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> --- hw/tc6393xb.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-)