gl: delete libretro vmu and crosshair textures when terminating

This commit is contained in:
Flyinghead 2021-07-11 20:43:04 +02:00
parent 1fdda98d8d
commit 97991fd8fc
3 changed files with 12 additions and 0 deletions

View File

@ -919,4 +919,12 @@ void DrawGunCrosshair(u8 port)
glcache.BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
void termVmuLightgun()
{
glcache.DeleteTextures(ARRAY_SIZE(vmuTextureId), vmuTextureId);
memset(vmuTextureId, 0, sizeof(vmuTextureId));
glcache.DeleteTextures(ARRAY_SIZE(lightgunTextureId), lightgunTextureId);
memset(lightgunTextureId, 0, sizeof(lightgunTextureId));
}
#endif

View File

@ -403,6 +403,9 @@ void termGLCommon()
free_output_framebuffer();
glcache.DeleteTextures(1, &fbTextureId);
fbTextureId = 0;
#ifdef LIBRETRO
termVmuLightgun();
#endif
}
static void gles_term()

View File

@ -338,4 +338,5 @@ out highp vec4 FragColor; \n\
"
#ifdef LIBRETRO
extern "C" struct retro_hw_render_callback hw_render;
void termVmuLightgun();
#endif