From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-trivial <qemu-trivial@nongnu.org>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] Align dummy display to fixed-size active console
Date: Sun, 19 Jun 2011 11:53:02 +0200 [thread overview]
Message-ID: <4DFDC6FE.1080307@web.de> (raw)
From: Jan Kiszka <jan.kiszka@siemens.com>
This fixes e.g. '-vga none -monitor vc:120Cx50C'.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
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
next reply other threads:[~2011-06-19 9:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-19 9:53 Jan Kiszka [this message]
2011-06-23 13:32 ` [Qemu-devel] [Qemu-trivial] [PATCH] Align dummy display to fixed-size active console Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DFDC6FE.1080307@web.de \
--to=jan.kiszka@web.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).