aboutsummaryrefslogtreecommitdiff
path: root/console.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-06-19 11:53:02 +0200
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-06-24 09:13:36 +0100
commit1802651cb5660d692756f36318e4daed0728c295 (patch)
treef1d693c7af8b4f77ab79789d6dc1ca432791c41b /console.c
parentf9245e100f12f03338a4e7660879139defb4ae3e (diff)
Align dummy display to fixed-size active console
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>
Diffstat (limited to 'console.c')
-rw-r--r--console.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/console.c b/console.c
index 9c6addf8e4..acd8ca162c 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);
}