mirror of https://github.com/mgba-emu/mgba.git
SDL: Move render context freeing to the right files
This commit is contained in:
parent
2dd391046a
commit
e21b4e3ee5
|
@ -160,5 +160,5 @@ void GBASDLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* render
|
|||
}
|
||||
|
||||
void GBASDLDeinit(struct SDLSoftwareRenderer* renderer) {
|
||||
UNUSED(renderer);
|
||||
free(renderer->d.outputBuffer);
|
||||
}
|
||||
|
|
|
@ -143,8 +143,6 @@ static bool _GBASDLInit(struct SDLSoftwareRenderer* renderer) {
|
|||
}
|
||||
|
||||
static void _GBASDLDeinit(struct SDLSoftwareRenderer* renderer) {
|
||||
free(renderer->d.outputBuffer);
|
||||
|
||||
GBASDLDeinitEvents(&renderer->events);
|
||||
GBASDLDeinitAudio(&renderer->audio);
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
|
|
|
@ -123,7 +123,9 @@ void GBASDLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* render
|
|||
}
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue