pthread_mutex_lock(&sdl_mutex);
#endif
+ if (surface_qemu != NULL) {
+ SDL_FreeSurface(surface_qemu);
+ surface_qemu = NULL;
+ }
+
/* create surface_qemu */
surface_qemu = SDL_CreateRGBSurfaceFrom(ds_get_data(ds),
ds_get_width(ds),
if (sdl_alteration == 1) {
sdl_alteration = 0;
_sdl_init();
+
+ return;
+ } else if (sdl_alteration == -1) {
+ SDL_FreeSurface(processing_screen);
+ SDL_FreeSurface(surface_qemu);
+ surface_qemu = NULL;
+ SDL_Quit();
+
return;
}
glDeleteTextures(1, &texture);
}
- SDL_FreeSurface(processing_screen);
- SDL_Quit();
+ sdl_alteration = -1;
}