SDL: Move render context freeing to the right files
Jeffrey Pfau jeffrey@endrift.com
Wed, 18 Mar 2015 23:38:42 -0700
3 files changed,
4 insertions(+),
4 deletions(-)
M
src/platform/sdl/gl-sdl.c
→
src/platform/sdl/gl-sdl.c
@@ -160,5 +160,5 @@ }
} void GBASDLDeinit(struct SDLSoftwareRenderer* renderer) { - UNUSED(renderer); + free(renderer->d.outputBuffer); }
M
src/platform/sdl/main.c
→
src/platform/sdl/main.c
@@ -143,8 +143,6 @@ return GBASDLInit(renderer);
} static void _GBASDLDeinit(struct SDLSoftwareRenderer* renderer) { - free(renderer->d.outputBuffer); - GBASDLDeinitEvents(&renderer->events); GBASDLDeinitAudio(&renderer->audio); #if SDL_VERSION_ATLEAST(2, 0, 0)
M
src/platform/sdl/sw-sdl.c
→
src/platform/sdl/sw-sdl.c
@@ -123,7 +123,9 @@ }
} void GBASDLDeinit(struct SDLSoftwareRenderer* renderer) { - UNUSED(renderer); + if (renderer->ratio > 1) { + free(renderer->d.outputBuffer); + } #if !SDL_VERSION_ATLEAST(2, 0, 0) SDL_Surface* surface = SDL_GetVideoSurface(); SDL_UnlockSurface(surface);