[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: More displaystate fallout?
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] Re: More displaystate fallout? |
Date: |
Thu, 22 Jan 2009 14:11:56 +0000 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080505) |
Stefan Weil wrote:
> To reproduce it, the 1st console window must be larger than 640 x 480
> (or the surface of dumb terminal smaller than this).
>
> Systems without VGA start with the monitor console which is larger.
> Qemu (SDL or VNC) will crash when switching from 1st to 2nd console
> and then back to 1st (which will never show again).
>
> See stack trace below. Maybe you must add a simple assertion to console.c
> to see the access violation.
>
> A simple (but crude) fix is to increase the size of the surface.
>
I am still unable to get a crash but I was able to get few rendering
problems.
However I think I understand the issue: if the is no graphic card and
the first console has a fixed size, the size of the display surface may
be wrong.
Does this patch fixes the problem for you?
---
diff --git a/console.c b/console.c
index dbb3b70..e02cf63 100644
--- a/console.c
+++ b/console.c
@@ -1419,13 +1419,22 @@ CharDriverState *text_console_init(const char *p)
void text_consoles_set_display(DisplayState *ds)
{
int i;
+ TextConsole *s;
for (i = 0; i < n_text_consoles; i++) {
text_console_do_init(text_consoles[i], ds, text_console_strs[i]);
qemu_free(text_console_strs[i]);
}
-
n_text_consoles = 0;
+
+ /* If there are no graphic cards and the first console has a fixed
+ * size we need to resize the screen surface according to the size
+ * of the first console */
+ s = consoles[0];
+ if (s && s->console_type == TEXT_CONSOLE_FIXED_SIZE) {
+ ds->surface = qemu_resize_displaysurface(ds->surface, s->g_width,
s->g_height, 32, 4 * s->g_width);
+ dpy_resize(ds);
+ }
}
void qemu_console_resize(DisplayState *ds, int width, int height)
- [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp..., Juergen Lock, 2009/01/18
- Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp..., Jędrzej Kalinowski, 2009/01/20
- Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp..., Matt, 2009/01/20
- More displaystate fallout? (was: Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...), Juergen Lock, 2009/01/20
- [Qemu-devel] Re: More displaystate fallout? (was: Re: [Qemu- devel] testing qemu svn r6367 on FreeB SD - sigev_signo; vmmouse, -vga vmware broken , slirp...), Jędrzej Kalinowski, 2009/01/21
- Re: [Qemu-devel] Re: More displaystate fallout?, Stefano Stabellini, 2009/01/21
- Re: [Qemu-devel] Re: More displaystate fallout?, Stefan Weil, 2009/01/21
- Re: [Qemu-devel] Re: More displaystate fallout?, Stefano Stabellini, 2009/01/21
- Re: [Qemu-devel] Re: More displaystate fallout?, Stefan Weil, 2009/01/21
- Re: [Qemu-devel] Re: More displaystate fallout?,
Stefano Stabellini <=
- Re: [Qemu-devel] Re: More displaystate fallout?, Stefano Stabellini, 2009/01/27
- Re: [Qemu-devel] Re: More displaystate fallout?, Stefano Stabellini, 2009/01/29
Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp..., Blue Swirl, 2009/01/24