summaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-02-06 19:56:42 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-02-06 19:56:42 +0000
commit898712a85c80d037446c7c5871c2491ae7fdbad7 (patch)
treebf325787a11bc3c4034d3a47a49791859511ca5b /sdl.c
parent4fa0f5d292add0d53554eb02351a78b18af8985d (diff)
downloadqemu-898712a85c80d037446c7c5871c2491ae7fdbad7.tar.gz
qemu-898712a85c80d037446c7c5871c2491ae7fdbad7.tar.bz2
qemu-898712a85c80d037446c7c5871c2491ae7fdbad7.zip
sdl_cleanup fix (Martin Garton)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@603 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sdl.c b/sdl.c
index 335ef8849a..5f1538f03d 100644
--- a/sdl.c
+++ b/sdl.c
@@ -52,6 +52,7 @@ static int gui_grab; /* if true, all keyboard/mouse events are grabbed */
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);
}
@@ -257,6 +258,11 @@ static void sdl_refresh(DisplayState *ds)
}
}
+static void sdl_cleanup(void)
+{
+ SDL_Quit();
+}
+
void sdl_display_init(DisplayState *ds)
{
int flags;
@@ -278,4 +284,6 @@ void sdl_display_init(DisplayState *ds)
SDL_WM_SetCaption("QEMU", "QEMU");
SDL_EnableKeyRepeat(250, 50);
gui_grab = 0;
+
+ atexit(sdl_cleanup);
}