]> git.proxmox.com Git - qemu.git/commitdiff
Align dummy display to fixed-size active console
authorJan Kiszka <jan.kiszka@siemens.com>
Sun, 19 Jun 2011 09:53:02 +0000 (11:53 +0200)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 24 Jun 2011 08:13:36 +0000 (09:13 +0100)
This fixes e.g. '-vga none -monitor vc:120Cx50C'.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
console.c

index 9c6addf8e44aa603b6f5c111637978e3f511ab29..acd8ca162cba55e6e1a59279c5dc3cbb505dce69 100644 (file)
--- 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);
 }