Roll gfx_widgets_context_destroy into gfx_widgets_free

This commit is contained in:
twinaphex 2020-02-17 16:35:19 +01:00
parent 166c0c2311
commit 4d148ff078
3 changed files with 5 additions and 7 deletions

View File

@ -2100,9 +2100,9 @@ void gfx_widgets_context_reset(bool is_threaded,
video_driver_monitor_reset();
}
void gfx_widgets_context_destroy(void)
static void gfx_widgets_context_destroy(void)
{
int i;
unsigned i;
/* TODO: Dismiss onscreen notifications that have been freed */
@ -2121,7 +2121,7 @@ void gfx_widgets_context_destroy(void)
gfx_display_font_free(font_bold);
font_regular = NULL;
font_bold = NULL;
font_bold = NULL;
}
#ifdef HAVE_CHEEVOS
@ -2146,6 +2146,8 @@ void gfx_widgets_free(void)
size_t i;
gfx_animation_ctx_tag libretro_tag;
gfx_widgets_context_destroy();
/* Kill any pending animation */
gfx_animation_kill_by_tag(&volume_tag);
gfx_animation_kill_by_tag(&gfx_widgets_generic_tag);

View File

@ -78,8 +78,6 @@ void gfx_widgets_context_reset(bool is_threaded,
unsigned width, unsigned height,
const char *dir_assets, char *font_path);
void gfx_widgets_context_destroy(void);
void gfx_widgets_push_achievement(const char *title, const char *badge);
/* Warning: not thread safe! */

View File

@ -23568,7 +23568,6 @@ static void driver_uninit(int flags)
* (e.g. Vulkan) will segfault */
if (gfx_widgets_inited)
{
gfx_widgets_context_destroy();
gfx_widgets_free();
gfx_widgets_inited = false;
}
@ -23637,7 +23636,6 @@ static void retroarch_deinit_drivers(void)
* (breaking video_driver_has_widgets) */
if (gfx_widgets_inited)
{
gfx_widgets_context_destroy();
gfx_widgets_free();
gfx_widgets_inited = false;
}