Commit 2ff897905470e5fb7ca4edccceee01109a968c30
1 parent
d6eb40f6
Fix segfault in -nographic mode, by Stefen Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2994 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
30 additions
and
1 deletions
vl.c
... | ... | @@ -4483,6 +4483,34 @@ void pcmcia_info(void) |
4483 | 4483 | } |
4484 | 4484 | |
4485 | 4485 | /***********************************************************/ |
4486 | +/* dumb display */ | |
4487 | + | |
4488 | +static void dumb_update(DisplayState *ds, int x, int y, int w, int h) | |
4489 | +{ | |
4490 | +} | |
4491 | + | |
4492 | +static void dumb_resize(DisplayState *ds, int w, int h) | |
4493 | +{ | |
4494 | +} | |
4495 | + | |
4496 | +static void dumb_refresh(DisplayState *ds) | |
4497 | +{ | |
4498 | +#if defined(CONFIG_SDL) | |
4499 | + vga_hw_update(); | |
4500 | +#endif | |
4501 | +} | |
4502 | + | |
4503 | +static void dumb_display_init(DisplayState *ds) | |
4504 | +{ | |
4505 | + ds->data = NULL; | |
4506 | + ds->linesize = 0; | |
4507 | + ds->depth = 0; | |
4508 | + ds->dpy_update = dumb_update; | |
4509 | + ds->dpy_resize = dumb_resize; | |
4510 | + ds->dpy_refresh = dumb_refresh; | |
4511 | +} | |
4512 | + | |
4513 | +/***********************************************************/ | |
4486 | 4514 | /* I/O handling */ |
4487 | 4515 | |
4488 | 4516 | #define MAX_IO_HANDLERS 64 |
... | ... | @@ -7884,7 +7912,8 @@ int main(int argc, char **argv) |
7884 | 7912 | /* terminal init */ |
7885 | 7913 | memset(&display_state, 0, sizeof(display_state)); |
7886 | 7914 | if (nographic) { |
7887 | - /* nothing to do */ | |
7915 | + /* nearly nothing to do */ | |
7916 | + dumb_display_init(ds); | |
7888 | 7917 | } else if (vnc_display != NULL) { |
7889 | 7918 | vnc_display_init(ds, vnc_display); |
7890 | 7919 | } else { | ... | ... |