comparison src/video/gem/SDL_gemvideo.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
473 return((SDL_Rect **)-1); 473 return((SDL_Rect **)-1);
474 } 474 }
475 475
476 static void GEM_FreeBuffers(_THIS) 476 static void GEM_FreeBuffers(_THIS)
477 { 477 {
478 #ifdef HAVE_OPENGL
479 if (gl_active) {
480 SDL_AtariGL_Quit(this);
481 }
482 #endif
483
484 /* Release buffer */ 478 /* Release buffer */
485 if ( GEM_buffer2 ) { 479 if ( GEM_buffer2 ) {
486 free( GEM_buffer2 ); 480 free( GEM_buffer2 );
487 GEM_buffer2=NULL; 481 GEM_buffer2=NULL;
488 } 482 }
1045 { 1039 {
1046 SDL_AtariXbios_RestoreVectors(); 1040 SDL_AtariXbios_RestoreVectors();
1047 1041
1048 GEM_FreeBuffers(this); 1042 GEM_FreeBuffers(this);
1049 1043
1044 #ifdef HAVE_OPENGL
1045 if (gl_active) {
1046 SDL_AtariGL_Quit(this, SDL_TRUE);
1047 }
1048 #endif
1049
1050 /* Destroy window */ 1050 /* Destroy window */
1051 if (GEM_handle>=0) { 1051 if (GEM_handle>=0) {
1052 wind_close(GEM_handle); 1052 wind_close(GEM_handle);
1053 wind_delete(GEM_handle); 1053 wind_delete(GEM_handle);
1054 GEM_handle=-1; 1054 GEM_handle=-1;