mirror of https://github.com/mgba-emu/mgba.git
SDL: Only unreference pixman buffers when necessary
This commit is contained in:
parent
d8c3236c85
commit
bc9dff00da
|
@ -108,11 +108,11 @@ void mSDLSWRunloop(struct mSDLRenderer* renderer, void* user) {
|
||||||
void mSDLSWDeinit(struct mSDLRenderer* renderer) {
|
void mSDLSWDeinit(struct mSDLRenderer* renderer) {
|
||||||
if (renderer->ratio > 1) {
|
if (renderer->ratio > 1) {
|
||||||
free(renderer->outputBuffer);
|
free(renderer->outputBuffer);
|
||||||
|
#ifdef USE_PIXMAN
|
||||||
|
pixman_image_unref(renderer->pix);
|
||||||
|
pixman_image_unref(renderer->screenpix);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
SDL_Surface* surface = SDL_GetVideoSurface();
|
SDL_Surface* surface = SDL_GetVideoSurface();
|
||||||
SDL_UnlockSurface(surface);
|
SDL_UnlockSurface(surface);
|
||||||
#ifdef USE_PIXMAN
|
|
||||||
pixman_image_unref(renderer->pix);
|
|
||||||
pixman_image_unref(renderer->screenpix);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue