static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
{
+ // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
SDL_UpdateRect(screen, x, y, w, h);
}
buttons |= MOUSE_EVENT_MBUTTON;
/* XXX: test wheel */
dz = 0;
+#ifdef SDL_BUTTON_WHEELUP
if (state & SDL_BUTTON(SDL_BUTTON_WHEELUP))
dz--;
if (state & SDL_BUTTON(SDL_BUTTON_WHEELDOWN))
dz++;
+#endif
kbd_mouse_event(dx, dy, dz, buttons);
}
}
}
+static void sdl_cleanup(void)
+{
+ SDL_Quit();
+}
+
void sdl_display_init(DisplayState *ds)
{
int flags;
SDL_WM_SetCaption("QEMU", "QEMU");
SDL_EnableKeyRepeat(250, 50);
gui_grab = 0;
+
+ atexit(sdl_cleanup);
}