1
0
mirror of https://github.com/libretro/RetroArch synced 2025-04-03 01:21:10 +00:00
This commit is contained in:
twinaphex 2016-02-09 04:55:45 +01:00
parent da1a5ad2cc
commit a0f35e56fa

@ -36,10 +36,6 @@
#include "../gfx/video_thread_wrapper.h" #include "../gfx/video_thread_wrapper.h"
#endif #endif
typedef struct menu_display
{
menu_display_ctx_driver_t *display_ctx;
} menu_display_t;
static menu_display_ctx_driver_t *menu_display_ctx_drivers[] = { static menu_display_ctx_driver_t *menu_display_ctx_drivers[] = {
@ -53,21 +49,6 @@ static menu_display_ctx_driver_t *menu_display_ctx_drivers[] = {
NULL, NULL,
}; };
static menu_display_t *menu_display_get_ptr(void)
{
static menu_display_t menu_display_state;
return &menu_display_state;
}
static menu_display_ctx_driver_t *menu_display_context_get_ptr(void)
{
menu_display_t *disp = menu_display_get_ptr();
if (!disp)
return NULL;
return disp->display_ctx;
}
static const char *menu_video_get_ident(void) static const char *menu_video_get_ident(void)
{ {
#ifdef HAVE_THREADS #ifdef HAVE_THREADS
@ -119,9 +100,7 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
static menu_display_draw_bg_t draw_bg_bak = NULL; static menu_display_draw_bg_t draw_bg_bak = NULL;
static msg_queue_t *menu_display_msg_queue = NULL; static msg_queue_t *menu_display_msg_queue = NULL;
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
menu_display_t *disp = menu_display_get_ptr(); static menu_display_ctx_driver_t *menu_disp = NULL;
menu_display_ctx_driver_t *menu_disp =
menu_display_context_get_ptr();
switch (state) switch (state)
{ {
@ -182,10 +161,10 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
menu_display_msg_queue = NULL; menu_display_msg_queue = NULL;
menu_display_msg_force = false; menu_display_msg_force = false;
menu_display_header_height = 0; menu_display_header_height = 0;
menu_disp = NULL;
menu_animation_ctl(MENU_ANIMATION_CTL_DEINIT, NULL); menu_animation_ctl(MENU_ANIMATION_CTL_DEINIT, NULL);
menu_display_ctl(MENU_DISPLAY_CTL_FRAMEBUF_DEINIT, NULL); menu_display_ctl(MENU_DISPLAY_CTL_FRAMEBUF_DEINIT, NULL);
memset(disp, 0, sizeof(menu_display_t));
break; break;
case MENU_DISPLAY_CTL_INIT: case MENU_DISPLAY_CTL_INIT:
retro_assert(menu_display_msg_queue = msg_queue_new(8)); retro_assert(menu_display_msg_queue = msg_queue_new(8));
@ -426,7 +405,7 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
RARCH_LOG("Found menu display driver: \"%s\".\n", RARCH_LOG("Found menu display driver: \"%s\".\n",
menu_display_ctx_drivers[i]->ident); menu_display_ctx_drivers[i]->ident);
disp->display_ctx = menu_display_ctx_drivers[i]; menu_disp = menu_display_ctx_drivers[i];
return true; return true;
} }
} }