all repos — mgba @ bc9dff00da64b899662dc4433ff750a1f1fd715e

mGBA Game Boy Advance Emulator

SDL: Only unreference pixman buffers when necessary
Cameron Cawley ccawley2011@gmail.com
Thu, 29 Nov 2018 21:45:11 +0000
commit

bc9dff00da64b899662dc4433ff750a1f1fd715e

parent

d8c3236c857abed3abe5e0db396515bcf3efd2c7

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/platform/sdl/sw-sdl1.csrc/platform/sdl/sw-sdl1.c

@@ -108,11 +108,11 @@

void mSDLSWDeinit(struct mSDLRenderer* renderer) { if (renderer->ratio > 1) { free(renderer->outputBuffer); +#ifdef USE_PIXMAN + pixman_image_unref(renderer->pix); + pixman_image_unref(renderer->screenpix); +#endif } SDL_Surface* surface = SDL_GetVideoSurface(); SDL_UnlockSurface(surface); -#ifdef USE_PIXMAN - pixman_image_unref(renderer->pix); - pixman_image_unref(renderer->screenpix); -#endif }