aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-01 16:58:29 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-01 16:58:29 +0000
commit97e7df27cfed973532d125125c9152ddffadbf64 (patch)
treecb809b6b85eb6a92b825c88f54103b5d7809ea3c /hw
parent92b72cbcd5d73c7a832a7964cbfbcc3110992f2d (diff)
Force display update on palette change or loadvm
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2915 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/tcx.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/hw/tcx.c b/hw/tcx.c
index 80d60baae1..bfcb386f7b 100644
--- a/hw/tcx.c
+++ b/hw/tcx.c
@@ -44,6 +44,8 @@ typedef struct TCXState {
static void tcx_screen_dump(void *opaque, const char *filename);
static void tcx24_screen_dump(void *opaque, const char *filename);
+static void tcx_invalidate_display(void *opaque);
+static void tcx24_invalidate_display(void *opaque);
/* XXX: unify with vga draw line functions */
static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g, unsigned b)
@@ -86,6 +88,10 @@ static void update_palette_entries(TCXState *s, int start, int end)
break;
}
}
+ if (s->depth == 24)
+ tcx24_invalidate_display(s);
+ else
+ tcx_invalidate_display(s);
}
static void tcx_draw_line32(TCXState *s1, uint8_t *d,
@@ -391,7 +397,10 @@ static int tcx_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_8s(f, &s->dac_index);
qemu_get_8s(f, &s->dac_state);
update_palette_entries(s, 0, 256);
- tcx_invalidate_display(s);
+ if (s->depth == 24)
+ tcx24_invalidate_display(s);
+ else
+ tcx_invalidate_display(s);
return 0;
}