src/video/xbios/SDL_xbios.c
changeset 992 0324ce32b2d9
parent 991 12b13601a544
child 993 2662da16d668
--- a/src/video/xbios/SDL_xbios.c	Fri Nov 26 16:16:50 2004 +0000
+++ b/src/video/xbios/SDL_xbios.c	Fri Nov 26 22:11:30 2004 +0000
@@ -434,12 +434,6 @@
 {
 	int i;
 
-#ifdef HAVE_OPENGL
-	if (gl_active) {
-		SDL_AtariGL_Quit(this);
-	}
-#endif
-
 	for (i=0;i<2;i++) {
 		if (XBIOS_screensmem[i]!=NULL) {
 			Mfree(XBIOS_screensmem[i]);
@@ -859,6 +853,13 @@
 	Vsync();
 #endif
 
+
+#ifdef HAVE_OPENGL
+	if (gl_active) {
+		SDL_AtariGL_Quit(this, SDL_TRUE);
+	}
+#endif
+
 	if (XBIOS_oldpalette) {
 		free(XBIOS_oldpalette);
 		XBIOS_oldpalette=NULL;