Unix SDL fixes, per suggestion by svenska.
This commit is contained in:
@@ -270,6 +270,11 @@ sdl_close(void)
|
|||||||
sdl_destroy_texture();
|
sdl_destroy_texture();
|
||||||
sdl_destroy_window();
|
sdl_destroy_window();
|
||||||
|
|
||||||
|
if (pixeldata != NULL) {
|
||||||
|
free(pixeldata);
|
||||||
|
pixeldata = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Quit. */
|
/* Quit. */
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
sdl_flags = -1;
|
sdl_flags = -1;
|
||||||
@@ -430,6 +435,8 @@ sdl_init_common(int flags)
|
|||||||
/* Make sure we get a clean exit. */
|
/* Make sure we get a clean exit. */
|
||||||
atexit(sdl_close);
|
atexit(sdl_close);
|
||||||
|
|
||||||
|
pixeldata = malloc(2048 * 2048 * 4);
|
||||||
|
|
||||||
/* Register our renderer! */
|
/* Register our renderer! */
|
||||||
video_setblit(sdl_blit_shim);
|
video_setblit(sdl_blit_shim);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user