mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-12 19:29:07 +01:00
[SDL] the window surface should not be freed
According to SDL's docs, the window surface is freed automatically by other functions (SDL_Quit in SDL1.2, and SDL_DestroyWindow in SDL2). I think this might have actually been the cause of those segmentation errors upon closing that I noticed back when I opened #114.
This commit is contained in:
parent
3edcab0b46
commit
5eafe5b0cc
@ -244,10 +244,7 @@ static void sdl_video_update()
|
||||
|
||||
static void sdl_video_close()
|
||||
{
|
||||
if (sdl_video.surf_bitmap)
|
||||
SDL_FreeSurface(sdl_video.surf_bitmap);
|
||||
if (sdl_video.surf_screen)
|
||||
SDL_FreeSurface(sdl_video.surf_screen);
|
||||
SDL_FreeSurface(sdl_video.surf_bitmap);
|
||||
}
|
||||
|
||||
/* Timer Sync */
|
||||
|
@ -250,10 +250,8 @@ static void sdl_video_update()
|
||||
|
||||
static void sdl_video_close()
|
||||
{
|
||||
if (sdl_video.surf_bitmap)
|
||||
SDL_FreeSurface(sdl_video.surf_bitmap);
|
||||
if (sdl_video.surf_screen)
|
||||
SDL_FreeSurface(sdl_video.surf_screen);
|
||||
SDL_FreeSurface(sdl_video.surf_bitmap);
|
||||
SDL_DestroyWindow(sdl_video.window);
|
||||
}
|
||||
|
||||
/* Timer Sync */
|
||||
|
Loading…
x
Reference in New Issue
Block a user