release achievement badge textures when video driver is deinitialized (#14329)

This commit is contained in:
Jamiras 2022-08-17 20:28:55 -06:00 committed by GitHub
parent e0a065d20e
commit 2acc7c4b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -53,6 +53,7 @@
#include "cheevos.h"
#include "cheevos_client.h"
#include "cheevos_menu.h"
#include "cheevos_locals.h"
#include "../network/netplay/netplay.h"

View File

@ -147,8 +147,6 @@ typedef struct rcheevos_menuitem_t
enum msg_hash_enums state_label_idx;
} rcheevos_menuitem_t;
void rcheevos_menu_reset_badges(void);
#endif
typedef struct rcheevos_locals_t

View File

@ -33,6 +33,7 @@ void rcheevos_menu_populate_hardcore_pause_submenu(void* data);
bool rcheevos_menu_get_state(unsigned menu_offset, char* buffer, size_t buffer_size);
bool rcheevos_menu_get_sublabel(unsigned menu_offset, char* buffer, size_t buffer_size);
uintptr_t rcheevos_menu_get_badge_texture(unsigned menu_offset);
void rcheevos_menu_reset_badges(void);
RETRO_END_DECLS

View File

@ -49,6 +49,9 @@
#ifdef HAVE_MENU
#include "menu/menu_driver.h"
#ifdef HAVE_CHEEVOS
#include "cheevos/cheevos_menu.h"
#endif
#endif
static void retro_frame_null(const void *data, unsigned width,
@ -719,7 +722,11 @@ void driver_uninit(int flags)
menu_explore_context_deinit();
#endif
menu_contentless_cores_context_deinit();
#ifdef HAVE_CHEEVOS
rcheevos_menu_reset_badges();
#endif
menu_driver_ctl(RARCH_MENU_CTL_DEINIT, NULL);
}
#endif