aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-16 21:01:48 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-16 21:01:48 +0000
commit42aa98e8843aa8e3e1f35991f4be63eab2417e94 (patch)
tree96333f7fd542c8f3fdc391d10be3b3a90eba92b2
parent2796dae08aad498fa54a131ce23d15b346df85ac (diff)
Remove assumption about a single graphic console.
This fixes a fault with the jazz_led since it has two graphic consoles. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6353 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--console.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/console.c b/console.c
index f69fd1b098..fe64fe445e 100644
--- a/console.c
+++ b/console.c
@@ -1190,13 +1190,13 @@ static void text_console_update(void *opaque, console_ch_t *chardata)
}
}
-static TextConsole *get_graphic_console(void)
+static TextConsole *get_graphic_console(DisplayState *ds)
{
int i;
TextConsole *s;
for (i = 0; i < nb_consoles; i++) {
s = consoles[i];
- if (s->console_type == GRAPHIC_CONSOLE)
+ if (s->console_type == GRAPHIC_CONSOLE && s->ds == ds)
return s;
}
return NULL;
@@ -1394,7 +1394,7 @@ void text_consoles_set_display(DisplayState *ds)
void qemu_console_resize(DisplayState *ds, int width, int height)
{
- TextConsole *s = get_graphic_console();
+ TextConsole *s = get_graphic_console(ds);
s->g_width = width;
s->g_height = height;
if (is_graphic_console()) {