* [Qemu-devel] [6369] Remove dumb_display (Stefan Stabellini)
@ 2009-01-19 16:34 Anthony Liguori
0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-01-19 16:34 UTC (permalink / raw)
To: qemu-devel
Revision: 6369
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6369
Author: aliguori
Date: 2009-01-19 16:34:10 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
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>
Modified Paths:
--------------
trunk/vl.c
Modified: trunk/vl.c
===================================================================
--- trunk/vl.c 2009-01-18 20:56:30 UTC (rev 6368)
+++ trunk/vl.c 2009-01-19 16:34:10 UTC (rev 6369)
@@ -2775,27 +2775,12 @@
/* 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);
-}
-
/***********************************************************/
/* I/O handling */
@@ -5535,6 +5520,8 @@
}
}
+ if (!display_state)
+ dumb_display_init();
/* just use the first displaystate for the moment */
ds = display_state;
/* terminal init */
@@ -5543,8 +5530,6 @@
fprintf(stderr, "fatal: -nographic can't be used with -curses\n");
exit(1);
}
- /* nearly nothing to do */
- dumb_display_init(ds);
} else {
#if defined(CONFIG_CURSES)
if (curses) {
@@ -5563,8 +5548,6 @@
sdl_display_init(ds, full_screen, no_frame);
#elif defined(CONFIG_COCOA)
cocoa_display_init(ds, full_screen);
-#else
- dumb_display_init(ds);
#endif
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-19 16:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 16:34 [Qemu-devel] [6369] Remove dumb_display (Stefan Stabellini) Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).