Merge pull request #12443 from libretro/vitafreetexture

Vita: wait before free texture
This commit is contained in:
Autechre 2021-05-27 19:53:43 +02:00 committed by GitHub
commit 138f41160f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -178,6 +178,7 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
if ((width != vita->width || height != vita->height) && vita->texture)
{
vita2d_wait_rendering_done();
vita2d_free_texture(vita->texture);
vita->texture = NULL;
}
@ -646,6 +647,7 @@ static void vita_set_texture_frame(void *data, const void *frame, bool rgb32,
if (width != vita->menu.width && height != vita->menu.height && vita->menu.texture)
{
vita2d_wait_rendering_done();
vita2d_free_texture(vita->menu.texture);
vita->menu.texture = NULL;
}

View File

@ -100,9 +100,7 @@ static void vita2d_font_free_font(void *data, bool is_threaded)
if (font->font_driver && font->font_data)
font->font_driver->free(font->font_data);
#if 0
vita2d_wait_rendering_done();
#endif
vita2d_free_texture(font->texture);
free(font);