mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 11:43:00 +00:00
Move code over to menu_driver.c
This commit is contained in:
parent
8ef9065c86
commit
e4bec6739c
@ -32,6 +32,7 @@
|
||||
|
||||
#include "menu_driver.h"
|
||||
#include "menu_cbs.h"
|
||||
#include "../driver.h"
|
||||
#include "../list_special.h"
|
||||
#include "../paths.h"
|
||||
#include "../tasks/task_powerstate.h"
|
||||
@ -5268,3 +5269,33 @@ const char *menu_driver_ident(void)
|
||||
return menu_st->driver_ctx->ident;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const menu_ctx_driver_t *menu_driver_find_driver(
|
||||
settings_t *settings,
|
||||
const char *prefix,
|
||||
bool verbosity_enabled)
|
||||
{
|
||||
int i = (int)driver_find_index("menu_driver",
|
||||
settings->arrays.menu_driver);
|
||||
|
||||
if (i >= 0)
|
||||
return (const menu_ctx_driver_t*)menu_ctx_drivers[i];
|
||||
|
||||
if (verbosity_enabled)
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_WARN("Couldn't find any %s named \"%s\"\n", prefix,
|
||||
settings->arrays.menu_driver);
|
||||
RARCH_LOG_OUTPUT("Available %ss are:\n", prefix);
|
||||
for (d = 0; menu_ctx_drivers[d]; d++)
|
||||
{
|
||||
if (menu_ctx_drivers[d])
|
||||
{
|
||||
RARCH_LOG_OUTPUT("\t%s\n", menu_ctx_drivers[d]->ident);
|
||||
}
|
||||
}
|
||||
RARCH_WARN("Going to default to first %s...\n", prefix);
|
||||
}
|
||||
|
||||
return (const menu_ctx_driver_t*)menu_ctx_drivers[0];
|
||||
}
|
||||
|
@ -854,6 +854,11 @@ void menu_input_search_cb(void *userdata, const char *str);
|
||||
void menu_input_key_event(bool down, unsigned keycode,
|
||||
uint32_t character, uint16_t mod);
|
||||
|
||||
const menu_ctx_driver_t *menu_driver_find_driver(
|
||||
settings_t *settings,
|
||||
const char *prefix,
|
||||
bool verbosity_enabled);
|
||||
|
||||
bool menu_driver_init_internal(
|
||||
gfx_display_t *p_disp,
|
||||
settings_t *settings,
|
||||
|
32
retroarch.c
32
retroarch.c
@ -25537,38 +25537,6 @@ static void retroarch_validate_cpu_features(struct rarch_state *p_rarch)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
static const menu_ctx_driver_t *menu_driver_find_driver(
|
||||
settings_t *settings,
|
||||
const char *prefix,
|
||||
bool verbosity_enabled)
|
||||
{
|
||||
int i = (int)driver_find_index("menu_driver",
|
||||
settings->arrays.menu_driver);
|
||||
|
||||
if (i >= 0)
|
||||
return (const menu_ctx_driver_t*)menu_ctx_drivers[i];
|
||||
|
||||
if (verbosity_enabled)
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_WARN("Couldn't find any %s named \"%s\"\n", prefix,
|
||||
settings->arrays.menu_driver);
|
||||
RARCH_LOG_OUTPUT("Available %ss are:\n", prefix);
|
||||
for (d = 0; menu_ctx_drivers[d]; d++)
|
||||
{
|
||||
if (menu_ctx_drivers[d])
|
||||
{
|
||||
RARCH_LOG_OUTPUT("\t%s\n", menu_ctx_drivers[d]->ident);
|
||||
}
|
||||
}
|
||||
RARCH_WARN("Going to default to first %s...\n", prefix);
|
||||
}
|
||||
|
||||
return (const menu_ctx_driver_t*)menu_ctx_drivers[0];
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* retroarch_main_init:
|
||||
* @argc : Count of (commandline) arguments.
|
||||
|
Loading…
x
Reference in New Issue
Block a user