mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
ensure cheevos badge textures are released before video driver is deinitialized
This commit is contained in:
parent
c70c13c01d
commit
2a5516b1b9
@ -1311,6 +1311,9 @@ bool rcheevos_unload(void)
|
|||||||
CHEEVOS_FREE(rcheevos_locals.richpresence.richpresence);
|
CHEEVOS_FREE(rcheevos_locals.richpresence.richpresence);
|
||||||
rcheevos_free_patchdata(&rcheevos_locals.patchdata);
|
rcheevos_free_patchdata(&rcheevos_locals.patchdata);
|
||||||
rcheevos_memory_destroy(&rcheevos_locals.memory);
|
rcheevos_memory_destroy(&rcheevos_locals.memory);
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
cheevos_reset_menu_badges();
|
||||||
|
#endif
|
||||||
|
|
||||||
rcheevos_locals.core = NULL;
|
rcheevos_locals.core = NULL;
|
||||||
rcheevos_locals.unofficial = NULL;
|
rcheevos_locals.unofficial = NULL;
|
||||||
|
@ -75,10 +75,8 @@ static bool gfx_widget_achievement_popup_init(bool video_is_threaded, bool fulls
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_widget_achievement_popup_free(void)
|
static void gfx_widget_achievement_popup_free_all(gfx_widget_achievement_popup_state_t* state)
|
||||||
{
|
{
|
||||||
gfx_widget_achievement_popup_state_t* state = gfx_widget_achievement_popup_get_ptr();
|
|
||||||
|
|
||||||
if (state->queue_read_index >= 0)
|
if (state->queue_read_index >= 0)
|
||||||
{
|
{
|
||||||
SLOCK_LOCK(state->queue_lock);
|
SLOCK_LOCK(state->queue_lock);
|
||||||
@ -88,6 +86,13 @@ static void gfx_widget_achievement_popup_free(void)
|
|||||||
|
|
||||||
SLOCK_UNLOCK(state->queue_lock);
|
SLOCK_UNLOCK(state->queue_lock);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void gfx_widget_achievement_popup_free(void)
|
||||||
|
{
|
||||||
|
gfx_widget_achievement_popup_state_t* state = gfx_widget_achievement_popup_get_ptr();
|
||||||
|
|
||||||
|
gfx_widget_achievement_popup_free_all(state);
|
||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
slock_free(state->queue_lock);
|
slock_free(state->queue_lock);
|
||||||
@ -95,6 +100,13 @@ static void gfx_widget_achievement_popup_free(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gfx_widget_achievement_popup_context_destroy(void)
|
||||||
|
{
|
||||||
|
gfx_widget_achievement_popup_state_t* state = gfx_widget_achievement_popup_get_ptr();
|
||||||
|
|
||||||
|
gfx_widget_achievement_popup_free_all(state);
|
||||||
|
}
|
||||||
|
|
||||||
static void gfx_widget_achievement_popup_frame(void* data, void* userdata)
|
static void gfx_widget_achievement_popup_frame(void* data, void* userdata)
|
||||||
{
|
{
|
||||||
gfx_widget_achievement_popup_state_t* state = gfx_widget_achievement_popup_get_ptr();
|
gfx_widget_achievement_popup_state_t* state = gfx_widget_achievement_popup_get_ptr();
|
||||||
@ -405,7 +417,7 @@ const gfx_widget_t gfx_widget_achievement_popup = {
|
|||||||
&gfx_widget_achievement_popup_init,
|
&gfx_widget_achievement_popup_init,
|
||||||
&gfx_widget_achievement_popup_free,
|
&gfx_widget_achievement_popup_free,
|
||||||
NULL, /* context_reset*/
|
NULL, /* context_reset*/
|
||||||
NULL, /* context_destroy */
|
&gfx_widget_achievement_popup_context_destroy,
|
||||||
NULL, /* layout */
|
NULL, /* layout */
|
||||||
NULL, /* iterate */
|
NULL, /* iterate */
|
||||||
&gfx_widget_achievement_popup_frame
|
&gfx_widget_achievement_popup_frame
|
||||||
|
Loading…
x
Reference in New Issue
Block a user