Mercurial > sdl-ios-xcode
comparison src/video/xbios/SDL_xbios.c @ 992:0324ce32b2d9
Keep current OpenGL context when possible
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Fri, 26 Nov 2004 22:11:30 +0000 |
parents | 12b13601a544 |
children | 2662da16d668 |
comparison
equal
deleted
inserted
replaced
991:12b13601a544 | 992:0324ce32b2d9 |
---|---|
432 | 432 |
433 static void XBIOS_FreeBuffers(_THIS) | 433 static void XBIOS_FreeBuffers(_THIS) |
434 { | 434 { |
435 int i; | 435 int i; |
436 | 436 |
437 #ifdef HAVE_OPENGL | |
438 if (gl_active) { | |
439 SDL_AtariGL_Quit(this); | |
440 } | |
441 #endif | |
442 | |
443 for (i=0;i<2;i++) { | 437 for (i=0;i<2;i++) { |
444 if (XBIOS_screensmem[i]!=NULL) { | 438 if (XBIOS_screensmem[i]!=NULL) { |
445 Mfree(XBIOS_screensmem[i]); | 439 Mfree(XBIOS_screensmem[i]); |
446 XBIOS_screensmem[i]=NULL; | 440 XBIOS_screensmem[i]=NULL; |
447 } | 441 } |
857 break; | 851 break; |
858 } | 852 } |
859 Vsync(); | 853 Vsync(); |
860 #endif | 854 #endif |
861 | 855 |
856 | |
857 #ifdef HAVE_OPENGL | |
858 if (gl_active) { | |
859 SDL_AtariGL_Quit(this, SDL_TRUE); | |
860 } | |
861 #endif | |
862 | |
862 if (XBIOS_oldpalette) { | 863 if (XBIOS_oldpalette) { |
863 free(XBIOS_oldpalette); | 864 free(XBIOS_oldpalette); |
864 XBIOS_oldpalette=NULL; | 865 XBIOS_oldpalette=NULL; |
865 } | 866 } |
866 XBIOS_FreeBuffers(this); | 867 XBIOS_FreeBuffers(this); |