From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa9hE-0004Rc-Ui for qemu-devel@nongnu.org; Fri, 24 Jun 2011 12:57:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qa9hD-0001Uy-0F for qemu-devel@nongnu.org; Fri, 24 Jun 2011 12:57:32 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:64284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa9hC-0001QQ-9F for qemu-devel@nongnu.org; Fri, 24 Jun 2011 12:57:30 -0400 Received: by mail-fx0-f45.google.com with SMTP id 12so94133fxg.4 for ; Fri, 24 Jun 2011 09:57:29 -0700 (PDT) From: Stefan Hajnoczi Date: Fri, 24 Jun 2011 17:56:38 +0100 Message-Id: <1308934609-20824-3-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1308934609-20824-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1308934609-20824-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 02/13] Align dummy display to fixed-size active console List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka , Anthony Liguori , Stefan Hajnoczi From: Jan Kiszka This fixes e.g. '-vga none -monitor vc:120Cx50C'. Signed-off-by: Jan Kiszka Signed-off-by: Stefan Hajnoczi --- 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.5.4