kvm: Rework VCPU reset
[qemu] / sdl.c
diff --git a/sdl.c b/sdl.c
index 843a6fc..178b553 100644 (file)
--- a/sdl.c
+++ b/sdl.c
@@ -86,7 +86,7 @@ static void sdl_setdata(DisplayState *ds)
                                             ds->surface->pf.bmask, ds->surface->pf.amask);
 }
 
-static void do_sdl_resize(int width, int height, int bpp)
+static void do_sdl_resize(int new_width, int new_height, int bpp)
 {
     int flags;
 
@@ -98,6 +98,8 @@ static void do_sdl_resize(int width, int height, int bpp)
     if (gui_noframe)
         flags |= SDL_NOFRAME;
 
+    width = new_width;
+    height = new_height;
     real_screen = SDL_SetVideoMode(width, height, bpp, flags);
     if (!real_screen) {
         fprintf(stderr, "Could not open SDL display\n");
@@ -249,9 +251,9 @@ static int check_for_evdev(void)
     keycodes = XGetAtomName(info.info.x11.display, desc->names->keycodes);
     if (keycodes == NULL)
         fprintf(stderr, "could not lookup keycode name\n");
-    else if (strstart(keycodes, "evdev_", NULL))
+    else if (strstart(keycodes, "evdev", NULL))
         has_evdev = 1;
-    else if (!strstart(keycodes, "xfree86_", NULL))
+    else if (!strstart(keycodes, "xfree86", NULL))
         fprintf(stderr,
                 "unknown keycodes `%s', please report to qemu-devel@nongnu.org\n",
                 keycodes);
@@ -751,7 +753,7 @@ static void sdl_cleanup(void)
 {
     if (guest_sprite)
         SDL_FreeCursor(guest_sprite);
-    SDL_Quit();
+    SDL_QuitSubSystem(SDL_INIT_VIDEO);
 }
 
 void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)