Skip to contentSkip to conversation

Align dummy display to fixed-size active console

PATCH Applied Jan Kiszka 2 participants 2 messages Jun 19, 2011 – Jun 23, 2011

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 Align dummy display to fixed-size active console

From: Jan Kiszka <[email protected]>

This fixes e.g. '-vga none -monitor vc:120Cx50C'.

---
 console.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
console.c +8 -1
index 9c6addf..acd8ca1 100644
@@ -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);
 }
 
Signature · 1 line
1.7.1