From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYEgk-00043k-Bd for qemu-devel@nongnu.org; Sun, 19 Jun 2011 05:53:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYEgj-0003J2-Az for qemu-devel@nongnu.org; Sun, 19 Jun 2011 05:53:06 -0400 Message-ID: <4DFDC6FE.1080307@web.de> Date: Sun, 19 Jun 2011 11:53:02 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH] Align dummy display to fixed-size active console List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial Cc: qemu-devel From: Jan Kiszka This fixes e.g. '-vga none -monitor vc:120Cx50C'. Signed-off-by: Jan Kiszka --- console.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/console.c b/console.c index 9c6addf..acd8ca1 100644 --- a/console.c +++ b/console.c @@ -1349,8 +1349,15 @@ static struct DisplayAllocator default_allocator = { static void dumb_display_init(void) { DisplayState *ds = qemu_mallocz(sizeof(DisplayState)); + int width = 640; + int height = 480; + ds->allocator = &default_allocator; - ds->surface = qemu_create_displaysurface(ds, 640, 480); + if (is_fixedsize_console()) { + width = active_console->g_width; + height = active_console->g_height; + } + ds->surface = qemu_create_displaysurface(ds, width, height); register_displaystate(ds); } -- 1.7.1