Remove dumb_display (Stefan Stabellini)
However I think the following fix is cleaner: we do not need a dumb_display_init that creates an empty DisplayChangeListener any more. We do need a dumb_display_init that allocates a zeroed DisplayState structure if none else does it. Tested-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6369 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
65e1d81b29
commit
8f391ab41a
27
vl.c
27
vl.c
@ -2775,25 +2775,10 @@ DisplayState *get_displaystate(void)
|
|||||||
|
|
||||||
/* dumb display */
|
/* dumb display */
|
||||||
|
|
||||||
static void dumb_update(DisplayState *ds, int x, int y, int w, int h)
|
static void dumb_display_init(void)
|
||||||
{
|
{
|
||||||
}
|
DisplayState *ds = qemu_mallocz(sizeof(DisplayState));
|
||||||
|
register_displaystate(ds);
|
||||||
static void dumb_resize(DisplayState *ds)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void dumb_display_init(DisplayState *ds)
|
|
||||||
{
|
|
||||||
DisplayChangeListener *dcl = qemu_mallocz(sizeof(DisplayChangeListener));
|
|
||||||
if (!dcl)
|
|
||||||
exit(1);
|
|
||||||
dcl->dpy_update = dumb_update;
|
|
||||||
dcl->dpy_resize = dumb_resize;
|
|
||||||
dcl->dpy_refresh = NULL;
|
|
||||||
dcl->idle = 1;
|
|
||||||
dcl->gui_timer_interval = 500;
|
|
||||||
register_displaychangelistener(ds, dcl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************/
|
/***********************************************************/
|
||||||
@ -5535,6 +5520,8 @@ int main(int argc, char **argv, char **envp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!display_state)
|
||||||
|
dumb_display_init();
|
||||||
/* just use the first displaystate for the moment */
|
/* just use the first displaystate for the moment */
|
||||||
ds = display_state;
|
ds = display_state;
|
||||||
/* terminal init */
|
/* terminal init */
|
||||||
@ -5543,8 +5530,6 @@ int main(int argc, char **argv, char **envp)
|
|||||||
fprintf(stderr, "fatal: -nographic can't be used with -curses\n");
|
fprintf(stderr, "fatal: -nographic can't be used with -curses\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
/* nearly nothing to do */
|
|
||||||
dumb_display_init(ds);
|
|
||||||
} else {
|
} else {
|
||||||
#if defined(CONFIG_CURSES)
|
#if defined(CONFIG_CURSES)
|
||||||
if (curses) {
|
if (curses) {
|
||||||
@ -5563,8 +5548,6 @@ int main(int argc, char **argv, char **envp)
|
|||||||
sdl_display_init(ds, full_screen, no_frame);
|
sdl_display_init(ds, full_screen, no_frame);
|
||||||
#elif defined(CONFIG_COCOA)
|
#elif defined(CONFIG_COCOA)
|
||||||
cocoa_display_init(ds, full_screen);
|
cocoa_display_init(ds, full_screen);
|
||||||
#else
|
|
||||||
dumb_display_init(ds);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user