diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-05 18:41:18 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-05 18:41:18 +0000 |
commit | 9586fefefe383a9aa25ad99bde9a6b240309ca33 (patch) | |
tree | 2c4444ed6e8edf5b072a240e8b25fc1fd8dd2001 /hw/vga_int.h | |
parent | b9e82a5946d902af445a53727c69b4851b1b20ff (diff) |
Fix display breakage when resizing the screen (v2) (Avi Kivity)
When the vga resolution changes, a new display surface is not allocated
immediately; instead that is deferred until the next update. However,
if we're running without a display client attached, that won't happen
and the next bitblt is likely to cause a segfault by overflowing the
display surface.
Fix by reallocating the display immediately when the resolution changes.
Tested with (Windows|Linux) x (cirrus|std) x (curses|sdl).
Changes from v1:
- fix segfault when switching virtual consoles with curses
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6989 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/vga_int.h')
-rw-r--r-- | hw/vga_int.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/vga_int.h b/hw/vga_int.h index f97e98fc97..6ab9742672 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -147,8 +147,11 @@ typedef void (* vga_update_retrace_info_fn)(struct VGAState *s); DisplayState *ds; \ uint32_t font_offsets[2]; \ int graphic_mode; \ + int want_full_update; \ uint8_t shift_control; \ uint8_t double_scan; \ + uint8_t multi_run; \ + uint8_t multi_scan; \ uint32_t line_offset; \ uint32_t line_compare; \ uint32_t start_addr; \ @@ -195,6 +198,7 @@ void vga_common_init(VGAState *s, uint8_t *vga_ram_base, ram_addr_t vga_ram_offset, int vga_ram_size); void vga_init(VGAState *s); void vga_reset(void *s); +void vga_update_resolution(VGAState *s); void vga_dirty_log_start(VGAState *s); void vga_dirty_log_stop(VGAState *s); |