mirror of
https://github.com/libretro/RetroArch
synced 2025-02-02 14:54:10 +00:00
Avoid some confusing opaqueness.
First argument of menu_ctx_init_first must always be const menu_ctx_driver_t**.
This commit is contained in:
parent
68593e39ea
commit
ab2040a100
5
driver.c
5
driver.c
@ -1709,10 +1709,9 @@ void find_next_menu_driver(void)
|
||||
RARCH_WARN("Couldn't find any next menu driver (current one: \"%s\").\n", g_settings.menu.driver);
|
||||
}
|
||||
|
||||
bool menu_ctx_init_first(const void **driver_data, void **data)
|
||||
bool menu_ctx_init_first(const menu_ctx_driver_t **driver, void **data)
|
||||
{
|
||||
unsigned i;
|
||||
const menu_ctx_driver_t **driver = (const menu_ctx_driver_t**)driver_data;
|
||||
|
||||
if (!menu_ctx_drivers[0])
|
||||
return false;
|
||||
@ -1724,7 +1723,7 @@ bool menu_ctx_init_first(const void **driver_data, void **data)
|
||||
if (h)
|
||||
{
|
||||
*driver = menu_ctx_drivers[i];
|
||||
*data = (void*)h;
|
||||
*data = h;
|
||||
strlcpy(g_settings.menu.driver, menu_ctx_drivers[i]->ident, sizeof(g_settings.menu.driver));
|
||||
return true;
|
||||
}
|
||||
|
2
driver.h
2
driver.h
@ -661,7 +661,7 @@ void driver_location_set_interval(unsigned interval_msecs, unsigned interval_dis
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
const void *menu_ctx_find_driver(const char *ident); // Finds driver with ident. Does not initialize.
|
||||
bool menu_ctx_init_first(const void **driver, void **handle); // Finds first suitable driver and initializes.
|
||||
bool menu_ctx_init_first(const menu_ctx_driver_t **driver, void **handle); // Finds first suitable driver and initializes.
|
||||
void find_prev_menu_driver(void);
|
||||
void find_next_menu_driver(void);
|
||||
#endif
|
||||
|
@ -432,8 +432,7 @@ bool load_menu_game(void)
|
||||
|
||||
void menu_init(void)
|
||||
{
|
||||
const void **menuctx = (const void**)&driver.menu_ctx;
|
||||
if (!menu_ctx_init_first(menuctx, (void**)&rgui))
|
||||
if (!menu_ctx_init_first(&driver.menu_ctx, (void**)&rgui))
|
||||
{
|
||||
RARCH_ERR("Could not initialize menu.\n");
|
||||
rarch_fail(1, "menu_init()");
|
||||
|
Loading…
x
Reference in New Issue
Block a user