mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
(Menu) Don't need menu_type_is anymore in menu display drivers
This commit is contained in:
parent
8071be73d9
commit
5188b3cc56
@ -196,19 +196,9 @@ static void glui_frame(void)
|
|||||||
const char *dir = NULL;
|
const char *dir = NULL;
|
||||||
const char *label = NULL;
|
const char *label = NULL;
|
||||||
unsigned menu_type = 0;
|
unsigned menu_type = 0;
|
||||||
unsigned menu_type_is = 0;
|
|
||||||
file_list_get_last(driver.menu->menu_stack, &dir, &label, &menu_type);
|
file_list_get_last(driver.menu->menu_stack, &dir, &label, &menu_type);
|
||||||
|
|
||||||
if (driver.menu_ctx && driver.menu_ctx->backend &&
|
get_title(label, dir, menu_type, title, sizeof(title));
|
||||||
driver.menu_ctx->backend->type_is)
|
|
||||||
menu_type_is = driver.menu_ctx->backend->type_is(label, menu_type);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
RARCH_LOG("Dir is: %s\n", label);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
get_title(label, dir, menu_type, menu_type_is,
|
|
||||||
title, sizeof(title));
|
|
||||||
|
|
||||||
char title_buf[256];
|
char title_buf[256];
|
||||||
menu_ticker_line(title_buf, glui_term_width - 3,
|
menu_ticker_line(title_buf, glui_term_width - 3,
|
||||||
|
@ -306,19 +306,13 @@ static void rgui_render(void)
|
|||||||
const char *dir = NULL;
|
const char *dir = NULL;
|
||||||
const char *label = NULL;
|
const char *label = NULL;
|
||||||
unsigned menu_type = 0;
|
unsigned menu_type = 0;
|
||||||
unsigned menu_type_is = 0;
|
|
||||||
file_list_get_last(driver.menu->menu_stack, &dir, &label, &menu_type);
|
file_list_get_last(driver.menu->menu_stack, &dir, &label, &menu_type);
|
||||||
|
|
||||||
if (driver.menu_ctx && driver.menu_ctx->backend &&
|
|
||||||
driver.menu_ctx->backend->type_is)
|
|
||||||
menu_type_is = driver.menu_ctx->backend->type_is(label, menu_type);
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
RARCH_LOG("Dir is: %s\n", label);
|
RARCH_LOG("Dir is: %s\n", label);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
get_title(label, dir, menu_type, menu_type_is,
|
get_title(label, dir, menu_type, title, sizeof(title));
|
||||||
title, sizeof(title));
|
|
||||||
|
|
||||||
char title_buf[256];
|
char title_buf[256];
|
||||||
menu_ticker_line(title_buf, RGUI_TERM_WIDTH - 3,
|
menu_ticker_line(title_buf, RGUI_TERM_WIDTH - 3,
|
||||||
|
@ -161,15 +161,9 @@ static void rmenu_render(void)
|
|||||||
const char *dir = NULL;
|
const char *dir = NULL;
|
||||||
const char *label = NULL;
|
const char *label = NULL;
|
||||||
unsigned menu_type = 0;
|
unsigned menu_type = 0;
|
||||||
unsigned menu_type_is = 0;
|
|
||||||
file_list_get_last(menu->menu_stack, &dir, &label, &menu_type);
|
file_list_get_last(menu->menu_stack, &dir, &label, &menu_type);
|
||||||
|
|
||||||
if (driver.menu_ctx && driver.menu_ctx->backend
|
get_title(label, dir, menu_type, title, sizeof(title));
|
||||||
&& driver.menu_ctx->backend->type_is)
|
|
||||||
menu_type_is = driver.menu_ctx->backend->type_is(label, menu_type);
|
|
||||||
|
|
||||||
get_title(label, dir, menu_type, menu_type_is,
|
|
||||||
title, sizeof(title));
|
|
||||||
|
|
||||||
char title_buf[256];
|
char title_buf[256];
|
||||||
menu_ticker_line(title_buf, RMENU_TERM_WIDTH,
|
menu_ticker_line(title_buf, RMENU_TERM_WIDTH,
|
||||||
|
@ -370,7 +370,6 @@ static void rmenu_xui_render(void)
|
|||||||
const char *dir = NULL;
|
const char *dir = NULL;
|
||||||
const char *label = NULL;
|
const char *label = NULL;
|
||||||
unsigned menu_type = 0;
|
unsigned menu_type = 0;
|
||||||
unsigned menu_type_is = 0;
|
|
||||||
|
|
||||||
if (!driver.menu || driver.menu->need_refresh &&
|
if (!driver.menu || driver.menu->need_refresh &&
|
||||||
(g_extern.lifecycle_state & (1ULL << MODE_MENU))
|
(g_extern.lifecycle_state & (1ULL << MODE_MENU))
|
||||||
@ -385,11 +384,7 @@ static void rmenu_xui_render(void)
|
|||||||
file_list_get_last(driver.menu->menu_stack, &dir,
|
file_list_get_last(driver.menu->menu_stack, &dir,
|
||||||
&label, &menu_type);
|
&label, &menu_type);
|
||||||
|
|
||||||
if (driver.menu_ctx && driver.menu_ctx->backend
|
get_title(label, dir, menu_type,
|
||||||
&& driver.menu_ctx->backend->type_is)
|
|
||||||
menu_type_is = driver.menu_ctx->backend->type_is(label, menu_type);
|
|
||||||
|
|
||||||
get_title(label, dir, menu_type, menu_type_is,
|
|
||||||
title, sizeof(title));
|
title, sizeof(title));
|
||||||
|
|
||||||
mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
|
mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t));
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
#define _DISP_SHARED_H
|
#define _DISP_SHARED_H
|
||||||
|
|
||||||
static void get_title(const char *label, const char *dir,
|
static void get_title(const char *label, const char *dir,
|
||||||
unsigned menu_type, unsigned menu_type_is,
|
unsigned menu_type, char *title, size_t sizeof_title)
|
||||||
char *title, size_t sizeof_title)
|
|
||||||
{
|
{
|
||||||
if (!strcmp(label, "core_list"))
|
if (!strcmp(label, "core_list"))
|
||||||
snprintf(title, sizeof_title, "CORE SELECTION %s", dir);
|
snprintf(title, sizeof_title, "CORE SELECTION %s", dir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user