Allow multiple graphics devices.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1803 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
pbrook 2006-04-09 01:06:34 +00:00
parent 07435f7462
commit 95219897ff
11 changed files with 124 additions and 99 deletions

16
sdl.c
View file

@ -314,8 +314,8 @@ static void toggle_full_screen(DisplayState *ds)
if (!gui_saved_grab)
sdl_grab_end();
}
vga_invalidate_display();
vga_update_display();
vga_hw_invalidate();
vga_hw_update();
}
static void sdl_refresh(DisplayState *ds)
@ -328,8 +328,7 @@ static void sdl_refresh(DisplayState *ds)
sdl_update_caption();
}
if (is_active_console(vga_console))
vga_update_display();
vga_hw_update();
while (SDL_PollEvent(ev)) {
switch (ev->type) {
@ -352,10 +351,7 @@ static void sdl_refresh(DisplayState *ds)
break;
case 0x02 ... 0x0a: /* '1' to '9' keys */
console_select(keycode - 0x02);
if (is_active_console(vga_console)) {
/* tell the vga console to redisplay itself */
vga_invalidate_display();
} else {
if (!is_graphic_console()) {
/* display grab if going to a text console */
if (gui_grab)
sdl_grab_end();
@ -365,7 +361,7 @@ static void sdl_refresh(DisplayState *ds)
default:
break;
}
} else if (!is_active_console(vga_console)) {
} else if (!is_graphic_console()) {
int keysym;
keysym = 0;
if (ev->key.keysym.mod & (KMOD_LCTRL | KMOD_RCTRL)) {
@ -420,7 +416,7 @@ static void sdl_refresh(DisplayState *ds)
}
}
}
if (is_active_console(vga_console))
if (is_graphic_console())
sdl_process_key(&ev->key);
break;
case SDL_QUIT: