mirror of https://github.com/xqemu/xqemu.git
Fix segfault in -nographic mode, by Stefen Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2994 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
d6eb40f650
commit
2ff8979054
31
vl.c
31
vl.c
|
@ -4482,6 +4482,34 @@ void pcmcia_info(void)
|
||||||
"Empty");
|
"Empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************/
|
||||||
|
/* dumb display */
|
||||||
|
|
||||||
|
static void dumb_update(DisplayState *ds, int x, int y, int w, int h)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dumb_resize(DisplayState *ds, int w, int h)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dumb_refresh(DisplayState *ds)
|
||||||
|
{
|
||||||
|
#if defined(CONFIG_SDL)
|
||||||
|
vga_hw_update();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dumb_display_init(DisplayState *ds)
|
||||||
|
{
|
||||||
|
ds->data = NULL;
|
||||||
|
ds->linesize = 0;
|
||||||
|
ds->depth = 0;
|
||||||
|
ds->dpy_update = dumb_update;
|
||||||
|
ds->dpy_resize = dumb_resize;
|
||||||
|
ds->dpy_refresh = dumb_refresh;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************/
|
/***********************************************************/
|
||||||
/* I/O handling */
|
/* I/O handling */
|
||||||
|
|
||||||
|
@ -7884,7 +7912,8 @@ int main(int argc, char **argv)
|
||||||
/* terminal init */
|
/* terminal init */
|
||||||
memset(&display_state, 0, sizeof(display_state));
|
memset(&display_state, 0, sizeof(display_state));
|
||||||
if (nographic) {
|
if (nographic) {
|
||||||
/* nothing to do */
|
/* nearly nothing to do */
|
||||||
|
dumb_display_init(ds);
|
||||||
} else if (vnc_display != NULL) {
|
} else if (vnc_display != NULL) {
|
||||||
vnc_display_init(ds, vnc_display);
|
vnc_display_init(ds, vnc_display);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue