Commit 42aa98e8843aa8e3e1f35991f4be63eab2417e94

Authored by aliguori
1 parent 2796dae0

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
Showing 1 changed file with 3 additions and 3 deletions
console.c
@@ -1190,13 +1190,13 @@ static void text_console_update(void *opaque, console_ch_t *chardata) @@ -1190,13 +1190,13 @@ static void text_console_update(void *opaque, console_ch_t *chardata)
1190 } 1190 }
1191 } 1191 }
1192 1192
1193 -static TextConsole *get_graphic_console(void) 1193 +static TextConsole *get_graphic_console(DisplayState *ds)
1194 { 1194 {
1195 int i; 1195 int i;
1196 TextConsole *s; 1196 TextConsole *s;
1197 for (i = 0; i < nb_consoles; i++) { 1197 for (i = 0; i < nb_consoles; i++) {
1198 s = consoles[i]; 1198 s = consoles[i];
1199 - if (s->console_type == GRAPHIC_CONSOLE) 1199 + if (s->console_type == GRAPHIC_CONSOLE && s->ds == ds)
1200 return s; 1200 return s;
1201 } 1201 }
1202 return NULL; 1202 return NULL;
@@ -1394,7 +1394,7 @@ void text_consoles_set_display(DisplayState *ds) @@ -1394,7 +1394,7 @@ void text_consoles_set_display(DisplayState *ds)
1394 1394
1395 void qemu_console_resize(DisplayState *ds, int width, int height) 1395 void qemu_console_resize(DisplayState *ds, int width, int height)
1396 { 1396 {
1397 - TextConsole *s = get_graphic_console(); 1397 + TextConsole *s = get_graphic_console(ds);
1398 s->g_width = width; 1398 s->g_width = width;
1399 s->g_height = height; 1399 s->g_height = height;
1400 if (is_graphic_console()) { 1400 if (is_graphic_console()) {