mirror of
https://github.com/libretro/RetroArch
synced 2025-02-27 18:41:01 +00:00
(Menu) Menu driver no longer uses a duplicate system info
struct
This commit is contained in:
parent
c74104f8c9
commit
3fbed8df27
32
command.c
32
command.c
@ -1643,30 +1643,25 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
case CMD_EVENT_LOAD_CORE_PERSIST:
|
case CMD_EVENT_LOAD_CORE_PERSIST:
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
bool *ptr = NULL;
|
core_info_ctx_find_t info_find;
|
||||||
rarch_system_info_t *system_info = runloop_get_system_info();
|
rarch_system_info_t *system_info = runloop_get_system_info();
|
||||||
struct retro_system_info *system = &system_info->info;
|
struct retro_system_info *system = &system_info->info;
|
||||||
|
|
||||||
if (menu_driver_ctl(RARCH_MENU_CTL_LOAD_NO_CONTENT_GET, &ptr))
|
|
||||||
{
|
|
||||||
core_info_ctx_find_t info_find;
|
|
||||||
|
|
||||||
#if defined(HAVE_DYNAMIC)
|
#if defined(HAVE_DYNAMIC)
|
||||||
if (string_is_empty(path_get(RARCH_PATH_CORE)))
|
if (string_is_empty(path_get(RARCH_PATH_CORE)))
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
libretro_get_system_info(
|
libretro_get_system_info(
|
||||||
path_get(RARCH_PATH_CORE),
|
path_get(RARCH_PATH_CORE),
|
||||||
system,
|
system,
|
||||||
ptr);
|
&system_info->load_no_content);
|
||||||
info_find.path = path_get(RARCH_PATH_CORE);
|
info_find.path = path_get(RARCH_PATH_CORE);
|
||||||
|
|
||||||
if (!core_info_load(&info_find))
|
if (!core_info_load(&info_find))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_DYNAMIC
|
#ifdef HAVE_DYNAMIC
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1773,7 +1768,6 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
|
|
||||||
content_get_status(&contentless, &is_inited);
|
content_get_status(&contentless, &is_inited);
|
||||||
|
|
||||||
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
|
|
||||||
command_event(CMD_EVENT_AUTOSAVE_STATE, NULL);
|
command_event(CMD_EVENT_AUTOSAVE_STATE, NULL);
|
||||||
command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL);
|
command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL);
|
||||||
command_event(CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET, NULL);
|
command_event(CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET, NULL);
|
||||||
@ -1783,10 +1777,10 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
return false;
|
return false;
|
||||||
#ifdef HAVE_DYNAMIC
|
#ifdef HAVE_DYNAMIC
|
||||||
path_clear(RARCH_PATH_CORE);
|
path_clear(RARCH_PATH_CORE);
|
||||||
#else
|
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
|
||||||
|
#endif
|
||||||
core_unload_game();
|
core_unload_game();
|
||||||
core_unload();
|
core_unload();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CMD_EVENT_QUIT:
|
case CMD_EVENT_QUIT:
|
||||||
|
1
core.h
1
core.h
@ -60,6 +60,7 @@ typedef struct rarch_system_info
|
|||||||
|
|
||||||
unsigned rotation;
|
unsigned rotation;
|
||||||
unsigned performance_level;
|
unsigned performance_level;
|
||||||
|
bool load_no_content;
|
||||||
|
|
||||||
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
|
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
|
||||||
char valid_extensions[255];
|
char valid_extensions[255];
|
||||||
|
@ -380,7 +380,9 @@ bool core_unload_game(void)
|
|||||||
{
|
{
|
||||||
video_driver_free_hw_context();
|
video_driver_free_hw_context();
|
||||||
audio_driver_stop();
|
audio_driver_stop();
|
||||||
|
|
||||||
current_core.retro_unload_game();
|
current_core.retro_unload_game();
|
||||||
|
|
||||||
current_core.game_loaded = false;
|
current_core.game_loaded = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1798,70 +1798,75 @@ static int mui_list_push(void *data, void *userdata,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_MAIN_MENU:
|
case DISPLAYLIST_MAIN_MENU:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
|
||||||
|
|
||||||
entry.data = menu;
|
|
||||||
entry.info = info;
|
|
||||||
entry.parse_type = PARSE_ACTION;
|
|
||||||
entry.add_empty_entry = false;
|
|
||||||
|
|
||||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
|
||||||
{
|
{
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_CONTENT_SETTINGS;
|
rarch_system_info_t *system = runloop_get_system_info();
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
}
|
|
||||||
|
|
||||||
if (menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL))
|
entry.data = menu;
|
||||||
{
|
entry.info = info;
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_START_CORE;
|
entry.parse_type = PARSE_ACTION;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
entry.add_empty_entry = false;
|
||||||
}
|
|
||||||
|
if (!string_is_empty(system->info.library_name) &&
|
||||||
|
!string_is_equal(system->info.library_name,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORE)))
|
||||||
|
{
|
||||||
|
entry.enum_idx = MENU_ENUM_LABEL_CONTENT_SETTINGS;
|
||||||
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (system->load_no_content)
|
||||||
|
{
|
||||||
|
entry.enum_idx = MENU_ENUM_LABEL_START_CORE;
|
||||||
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef HAVE_DYNAMIC
|
#ifndef HAVE_DYNAMIC
|
||||||
if (frontend_driver_has_fork())
|
if (frontend_driver_has_fork())
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_CORE_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_CORE_LIST;
|
||||||
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
}
|
|
||||||
|
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY;
|
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
|
||||||
|
|
||||||
#if defined(HAVE_NETWORKING)
|
#if defined(HAVE_NETWORKING)
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_ONLINE_UPDATER;
|
entry.enum_idx = MENU_ENUM_LABEL_ONLINE_UPDATER;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_NETPLAY;
|
entry.enum_idx = MENU_ENUM_LABEL_NETPLAY;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#endif
|
#endif
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_INFORMATION_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_INFORMATION_LIST;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#ifndef HAVE_DYNAMIC
|
#ifndef HAVE_DYNAMIC
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH;
|
entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#endif
|
#endif
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_CONFIGURATIONS_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_CONFIGURATIONS_LIST;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_HELP_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_HELP_LIST;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#if !defined(IOS)
|
#if !defined(IOS)
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH;
|
entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_LAKKA)
|
#if defined(HAVE_LAKKA)
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_REBOOT;
|
entry.enum_idx = MENU_ENUM_LABEL_REBOOT;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_SHUTDOWN;
|
entry.enum_idx = MENU_ENUM_LABEL_SHUTDOWN;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#endif
|
#endif
|
||||||
info->need_push = true;
|
info->need_push = true;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -4031,64 +4031,69 @@ static int xmb_list_push(void *data, void *userdata,
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case DISPLAYLIST_MAIN_MENU:
|
case DISPLAYLIST_MAIN_MENU:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
|
||||||
|
|
||||||
entry.data = menu;
|
|
||||||
entry.info = info;
|
|
||||||
entry.parse_type = PARSE_ACTION;
|
|
||||||
entry.add_empty_entry = false;
|
|
||||||
|
|
||||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
|
||||||
{
|
{
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_CONTENT_SETTINGS;
|
rarch_system_info_t *system = runloop_get_system_info();
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
}
|
|
||||||
|
|
||||||
if (menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL))
|
entry.data = menu;
|
||||||
{
|
entry.info = info;
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_START_CORE;
|
entry.parse_type = PARSE_ACTION;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
entry.add_empty_entry = false;
|
||||||
}
|
|
||||||
|
if (!string_is_empty(system->info.library_name) &&
|
||||||
|
!string_is_equal(system->info.library_name,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORE)))
|
||||||
|
{
|
||||||
|
entry.enum_idx = MENU_ENUM_LABEL_CONTENT_SETTINGS;
|
||||||
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (system->load_no_content)
|
||||||
|
{
|
||||||
|
entry.enum_idx = MENU_ENUM_LABEL_START_CORE;
|
||||||
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef HAVE_DYNAMIC
|
#ifndef HAVE_DYNAMIC
|
||||||
if (frontend_driver_has_fork())
|
if (frontend_driver_has_fork())
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_CORE_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_CORE_LIST;
|
||||||
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
}
|
|
||||||
|
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_ADD_CONTENT_LIST;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_ADD_CONTENT_LIST;
|
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
|
||||||
#if defined(HAVE_NETWORKING)
|
#if defined(HAVE_NETWORKING)
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_ONLINE_UPDATER;
|
entry.enum_idx = MENU_ENUM_LABEL_ONLINE_UPDATER;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#endif
|
#endif
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_INFORMATION_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_INFORMATION_LIST;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#ifndef HAVE_DYNAMIC
|
#ifndef HAVE_DYNAMIC
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH;
|
entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#endif
|
#endif
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_CONFIGURATIONS_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_CONFIGURATIONS_LIST;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_HELP_LIST;
|
entry.enum_idx = MENU_ENUM_LABEL_HELP_LIST;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#if !defined(IOS)
|
#if !defined(IOS)
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH;
|
entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
#endif
|
#endif
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_REBOOT;
|
entry.enum_idx = MENU_ENUM_LABEL_REBOOT;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
|
|
||||||
entry.enum_idx = MENU_ENUM_LABEL_SHUTDOWN;
|
entry.enum_idx = MENU_ENUM_LABEL_SHUTDOWN;
|
||||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||||
info->need_push = true;
|
info->need_push = true;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -6000,16 +6000,19 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
{
|
{
|
||||||
rarch_system_info_t *system = runloop_get_system_info();
|
rarch_system_info_t *system = runloop_get_system_info();
|
||||||
|
|
||||||
(void)system;
|
if (system)
|
||||||
|
{
|
||||||
|
if ( !string_is_empty(system->info.library_name) &&
|
||||||
|
!string_is_equal(system->info.library_name,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORE)))
|
||||||
|
menu_displaylist_parse_settings_enum(menu, info,
|
||||||
|
MENU_ENUM_LABEL_CONTENT_SETTINGS,
|
||||||
|
PARSE_ACTION, false);
|
||||||
|
|
||||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
if (system->load_no_content)
|
||||||
menu_displaylist_parse_settings_enum(menu, info,
|
menu_displaylist_parse_settings_enum(menu, info,
|
||||||
MENU_ENUM_LABEL_CONTENT_SETTINGS,
|
MENU_ENUM_LABEL_START_CORE, PARSE_ACTION, false);
|
||||||
PARSE_ACTION, false);
|
}
|
||||||
|
|
||||||
if (menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL))
|
|
||||||
menu_displaylist_parse_settings_enum(menu, info,
|
|
||||||
MENU_ENUM_LABEL_START_CORE, PARSE_ACTION, false);
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef HAVE_DYNAMIC
|
#ifndef HAVE_DYNAMIC
|
||||||
|
@ -138,7 +138,6 @@ static menu_display_ctx_driver_t *menu_disp = NULL;
|
|||||||
|
|
||||||
static bool menu_driver_pending_quick_menu = false;
|
static bool menu_driver_pending_quick_menu = false;
|
||||||
static bool menu_driver_prevent_populate = false;
|
static bool menu_driver_prevent_populate = false;
|
||||||
static bool menu_driver_load_no_content = false;
|
|
||||||
static bool menu_driver_alive = false;
|
static bool menu_driver_alive = false;
|
||||||
static bool menu_driver_toggled = false;
|
static bool menu_driver_toggled = false;
|
||||||
static bool menu_driver_data_own = false;
|
static bool menu_driver_data_own = false;
|
||||||
@ -1685,7 +1684,6 @@ void menu_driver_destroy(void)
|
|||||||
menu_driver_pending_quit = false;
|
menu_driver_pending_quit = false;
|
||||||
menu_driver_pending_shutdown = false;
|
menu_driver_pending_shutdown = false;
|
||||||
menu_driver_prevent_populate = false;
|
menu_driver_prevent_populate = false;
|
||||||
menu_driver_load_no_content = false;
|
|
||||||
menu_driver_alive = false;
|
menu_driver_alive = false;
|
||||||
menu_driver_data_own = false;
|
menu_driver_data_own = false;
|
||||||
menu_driver_ctx = NULL;
|
menu_driver_ctx = NULL;
|
||||||
@ -1851,22 +1849,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
|||||||
}
|
}
|
||||||
menu_driver_data = NULL;
|
menu_driver_data = NULL;
|
||||||
break;
|
break;
|
||||||
case RARCH_MENU_CTL_LOAD_NO_CONTENT_GET:
|
|
||||||
{
|
|
||||||
bool **ptr = (bool**)data;
|
|
||||||
if (!ptr)
|
|
||||||
return false;
|
|
||||||
*ptr = (bool*)&menu_driver_load_no_content;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT:
|
|
||||||
return menu_driver_load_no_content;
|
|
||||||
case RARCH_MENU_CTL_SET_LOAD_NO_CONTENT:
|
|
||||||
menu_driver_load_no_content = true;
|
|
||||||
break;
|
|
||||||
case RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT:
|
|
||||||
menu_driver_load_no_content = false;
|
|
||||||
break;
|
|
||||||
case RARCH_MENU_CTL_LIST_GET_ENTRY:
|
case RARCH_MENU_CTL_LIST_GET_ENTRY:
|
||||||
{
|
{
|
||||||
menu_ctx_list_t *list = (menu_ctx_list_t*)data;
|
menu_ctx_list_t *list = (menu_ctx_list_t*)data;
|
||||||
|
@ -99,10 +99,6 @@ enum rarch_menu_ctl_state
|
|||||||
RARCH_MENU_CTL_SET_OWN_DRIVER,
|
RARCH_MENU_CTL_SET_OWN_DRIVER,
|
||||||
RARCH_MENU_CTL_UNSET_OWN_DRIVER,
|
RARCH_MENU_CTL_UNSET_OWN_DRIVER,
|
||||||
RARCH_MENU_CTL_OWNS_DRIVER,
|
RARCH_MENU_CTL_OWNS_DRIVER,
|
||||||
RARCH_MENU_CTL_LOAD_NO_CONTENT_GET,
|
|
||||||
RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT,
|
|
||||||
RARCH_MENU_CTL_SET_LOAD_NO_CONTENT,
|
|
||||||
RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT,
|
|
||||||
RARCH_MENU_CTL_PLAYLIST_FREE,
|
RARCH_MENU_CTL_PLAYLIST_FREE,
|
||||||
RARCH_MENU_CTL_PLAYLIST_INIT,
|
RARCH_MENU_CTL_PLAYLIST_INIT,
|
||||||
RARCH_MENU_CTL_PLAYLIST_GET,
|
RARCH_MENU_CTL_PLAYLIST_GET,
|
||||||
|
@ -1538,6 +1538,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
|||||||
break;
|
break;
|
||||||
case RARCH_CTL_SYSTEM_INFO_FREE:
|
case RARCH_CTL_SYSTEM_INFO_FREE:
|
||||||
/* No longer valid. */
|
/* No longer valid. */
|
||||||
|
|
||||||
if (runloop_system.subsystem.data)
|
if (runloop_system.subsystem.data)
|
||||||
free(runloop_system.subsystem.data);
|
free(runloop_system.subsystem.data);
|
||||||
runloop_system.subsystem.data = NULL;
|
runloop_system.subsystem.data = NULL;
|
||||||
@ -1557,8 +1558,14 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
|||||||
runloop_frontend_key_event = NULL;
|
runloop_frontend_key_event = NULL;
|
||||||
|
|
||||||
audio_driver_unset_callback();
|
audio_driver_unset_callback();
|
||||||
|
|
||||||
|
runloop_system.info.library_name = NULL;
|
||||||
|
runloop_system.info.library_version = NULL;
|
||||||
|
runloop_system.info.valid_extensions = NULL;
|
||||||
|
runloop_system.info.need_fullpath = false;
|
||||||
|
runloop_system.info.block_extract = false;
|
||||||
|
|
||||||
memset(&runloop_system, 0, sizeof(rarch_system_info_t));
|
memset(&runloop_system, 0, sizeof(rarch_system_info_t));
|
||||||
memset(&runloop_system.info, 0, sizeof(struct retro_system_info));
|
|
||||||
break;
|
break;
|
||||||
case RARCH_CTL_SET_FRAME_TIME_LAST:
|
case RARCH_CTL_SET_FRAME_TIME_LAST:
|
||||||
runloop_frame_time_last = 0;
|
runloop_frame_time_last = 0;
|
||||||
|
@ -756,12 +756,12 @@ static void menu_content_environment_get(int *argc, char *argv[],
|
|||||||
void *args, void *params_data)
|
void *args, void *params_data)
|
||||||
{
|
{
|
||||||
struct rarch_main_wrap *wrap_args = (struct rarch_main_wrap*)params_data;
|
struct rarch_main_wrap *wrap_args = (struct rarch_main_wrap*)params_data;
|
||||||
|
rarch_system_info_t *sys_info = runloop_get_system_info();
|
||||||
|
|
||||||
if (!wrap_args)
|
if (!wrap_args)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wrap_args->no_content = menu_driver_ctl(
|
wrap_args->no_content = sys_info->load_no_content;
|
||||||
RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL);
|
|
||||||
|
|
||||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_VERBOSITY, NULL))
|
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_VERBOSITY, NULL))
|
||||||
wrap_args->verbose = verbosity_is_enabled();
|
wrap_args->verbose = verbosity_is_enabled();
|
||||||
@ -990,6 +990,7 @@ bool task_push_start_dummy_core(content_ctx_info_t *content_info)
|
|||||||
char *error_string = NULL;
|
char *error_string = NULL;
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
rarch_system_info_t *sys_info = runloop_get_system_info();
|
||||||
|
|
||||||
if (!content_info)
|
if (!content_info)
|
||||||
return false;
|
return false;
|
||||||
@ -1039,9 +1040,7 @@ bool task_push_start_dummy_core(content_ctx_info_t *content_info)
|
|||||||
|
|
||||||
/* Preliminary stuff that has to be done before we
|
/* Preliminary stuff that has to be done before we
|
||||||
* load the actual content. Can differ per mode. */
|
* load the actual content. Can differ per mode. */
|
||||||
#ifdef HAVE_MENU
|
sys_info->load_no_content = false;
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT, NULL);
|
|
||||||
#endif
|
|
||||||
rarch_ctl(RARCH_CTL_STATE_FREE, NULL);
|
rarch_ctl(RARCH_CTL_STATE_FREE, NULL);
|
||||||
rarch_ctl(RARCH_CTL_DATA_DEINIT, NULL);
|
rarch_ctl(RARCH_CTL_DATA_DEINIT, NULL);
|
||||||
rarch_ctl(RARCH_CTL_TASK_INIT, NULL);
|
rarch_ctl(RARCH_CTL_TASK_INIT, NULL);
|
||||||
@ -1086,6 +1085,7 @@ bool task_push_load_content_from_playlist_from_menu(
|
|||||||
char *error_string = NULL;
|
char *error_string = NULL;
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
rarch_system_info_t *sys_info = runloop_get_system_info();
|
||||||
|
|
||||||
content_ctx.check_firmware_before_loading = settings->bools.check_firmware_before_loading;
|
content_ctx.check_firmware_before_loading = settings->bools.check_firmware_before_loading;
|
||||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||||
@ -1127,9 +1127,9 @@ bool task_push_load_content_from_playlist_from_menu(
|
|||||||
|
|
||||||
/* Is content required by this core? */
|
/* Is content required by this core? */
|
||||||
if (fullpath)
|
if (fullpath)
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT, NULL);
|
sys_info->load_no_content = false;
|
||||||
else
|
else
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_LOAD_NO_CONTENT, NULL);
|
sys_info->load_no_content = true;
|
||||||
|
|
||||||
/* On targets that have no dynamic core loading support, we'd
|
/* On targets that have no dynamic core loading support, we'd
|
||||||
* execute the new core from this point. If this returns false,
|
* execute the new core from this point. If this returns false,
|
||||||
|
@ -278,11 +278,10 @@ static char** waiting_argv;
|
|||||||
{
|
{
|
||||||
if (filenames.count == 1 && [filenames objectAtIndex:0])
|
if (filenames.count == 1 && [filenames objectAtIndex:0])
|
||||||
{
|
{
|
||||||
struct retro_system_info *system = NULL;
|
rarch_system_info_t *info = runloop_get_system_info();
|
||||||
NSString *__core = [filenames objectAtIndex:0];
|
struct retro_system_info *system = &info->info;
|
||||||
const char *core_name = NULL;
|
NSString *__core = [filenames objectAtIndex:0];
|
||||||
|
const char *core_name = NULL;
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET, &system);
|
|
||||||
|
|
||||||
if (system)
|
if (system)
|
||||||
core_name = system->library_name;
|
core_name = system->library_name;
|
||||||
@ -320,6 +319,7 @@ static char** waiting_argv;
|
|||||||
|
|
||||||
static void open_core_handler(ui_browser_window_state_t *state, bool result)
|
static void open_core_handler(ui_browser_window_state_t *state, bool result)
|
||||||
{
|
{
|
||||||
|
rarch_system_info_t *info = runloop_get_system_info();
|
||||||
if (!state)
|
if (!state)
|
||||||
return;
|
return;
|
||||||
if (string_is_empty(state->result))
|
if (string_is_empty(state->result))
|
||||||
@ -332,8 +332,8 @@ static void open_core_handler(ui_browser_window_state_t *state, bool result)
|
|||||||
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, (void*)state->result);
|
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, (void*)state->result);
|
||||||
ui_companion_event_command(CMD_EVENT_LOAD_CORE);
|
ui_companion_event_command(CMD_EVENT_LOAD_CORE);
|
||||||
|
|
||||||
if (menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL)
|
if (info && info->load_no_content
|
||||||
&& settings->bools.set_supports_no_game_enable)
|
&& settings->bools.set_supports_no_game_enable)
|
||||||
{
|
{
|
||||||
content_ctx_info_t content_info = {0};
|
content_ctx_info_t content_info = {0};
|
||||||
path_clear(RARCH_PATH_CONTENT);
|
path_clear(RARCH_PATH_CONTENT);
|
||||||
@ -354,11 +354,10 @@ static void open_document_handler(ui_browser_window_state_t *state, bool result)
|
|||||||
if (!result)
|
if (!result)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
struct retro_system_info *system = NULL;
|
rarch_system_info_t *info = runloop_get_system_info();
|
||||||
|
struct retro_system_info *system = &info->info;
|
||||||
const char *core_name = NULL;
|
const char *core_name = NULL;
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET, &system);
|
|
||||||
|
|
||||||
if (system)
|
if (system)
|
||||||
core_name = system->library_name;
|
core_name = system->library_name;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user