Fix menu core unload
This commit is contained in:
parent
a77049b022
commit
97bc2da36c
|
@ -7785,6 +7785,17 @@ static int action_ok_start_core(const char *path,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int action_ok_unload_core(const char *path,
|
||||||
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
|
{
|
||||||
|
struct menu_state *menu_st = menu_state_get_ptr();
|
||||||
|
int ret = generic_action_ok_command(CMD_EVENT_UNLOAD_CORE);
|
||||||
|
path_clear(RARCH_PATH_CORE_LAST);
|
||||||
|
menu_st->flags |= MENU_ST_FLAG_ENTRIES_NEED_REFRESH
|
||||||
|
| MENU_ST_FLAG_PREVENT_POPULATE;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int action_ok_contentless_core_run(const char *path,
|
static int action_ok_contentless_core_run(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
|
@ -9030,6 +9041,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||||
{MENU_ENUM_LABEL_FILE_BROWSER_CORE, action_ok_load_core},
|
{MENU_ENUM_LABEL_FILE_BROWSER_CORE, action_ok_load_core},
|
||||||
{MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION,action_ok_core_deferred_set},
|
{MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION,action_ok_core_deferred_set},
|
||||||
{MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION_CURRENT_CORE,action_ok_core_deferred_set},
|
{MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION_CURRENT_CORE,action_ok_core_deferred_set},
|
||||||
|
{MENU_ENUM_LABEL_CORE_LIST_UNLOAD, action_ok_unload_core},
|
||||||
{MENU_ENUM_LABEL_START_CORE, action_ok_start_core},
|
{MENU_ENUM_LABEL_START_CORE, action_ok_start_core},
|
||||||
{MENU_ENUM_LABEL_START_NET_RETROPAD, action_ok_start_net_retropad_core},
|
{MENU_ENUM_LABEL_START_NET_RETROPAD, action_ok_start_net_retropad_core},
|
||||||
{MENU_ENUM_LABEL_START_VIDEO_PROCESSOR, action_ok_start_video_processor_core},
|
{MENU_ENUM_LABEL_START_VIDEO_PROCESSOR, action_ok_start_video_processor_core},
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "../../retroarch.h"
|
#include "../../retroarch.h"
|
||||||
#include "../../verbosity.h"
|
#include "../../verbosity.h"
|
||||||
|
#include "../../paths.h"
|
||||||
#include "../../performance_counters.h"
|
#include "../../performance_counters.h"
|
||||||
#include "../../playlist.h"
|
#include "../../playlist.h"
|
||||||
#include "../../manual_content_scan.h"
|
#include "../../manual_content_scan.h"
|
||||||
|
@ -634,8 +635,8 @@ static int action_start_load_core(
|
||||||
unsigned type, size_t idx, size_t entry_idx)
|
unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
struct menu_state *menu_st = menu_state_get_ptr();
|
struct menu_state *menu_st = menu_state_get_ptr();
|
||||||
int ret = generic_action_ok_command(
|
int ret = generic_action_ok_command(CMD_EVENT_UNLOAD_CORE);
|
||||||
CMD_EVENT_UNLOAD_CORE);
|
path_clear(RARCH_PATH_CORE_LAST);
|
||||||
menu_st->flags |= MENU_ST_FLAG_ENTRIES_NEED_REFRESH
|
menu_st->flags |= MENU_ST_FLAG_ENTRIES_NEED_REFRESH
|
||||||
| MENU_ST_FLAG_PREVENT_POPULATE;
|
| MENU_ST_FLAG_PREVENT_POPULATE;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -9884,7 +9884,6 @@ static bool setting_append_list(
|
||||||
&group_info,
|
&group_info,
|
||||||
&subgroup_info,
|
&subgroup_info,
|
||||||
parent_group);
|
parent_group);
|
||||||
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_UNLOAD_CORE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2114,6 +2114,7 @@ bool task_push_load_content_from_playlist_from_menu(
|
||||||
* > Forget manually loaded core */
|
* > Forget manually loaded core */
|
||||||
path_set(RARCH_PATH_CORE, core_path);
|
path_set(RARCH_PATH_CORE, core_path);
|
||||||
path_clear(RARCH_PATH_CORE_LAST);
|
path_clear(RARCH_PATH_CORE_LAST);
|
||||||
|
|
||||||
#ifdef HAVE_DYNAMIC
|
#ifdef HAVE_DYNAMIC
|
||||||
command_event(CMD_EVENT_LOAD_CORE, NULL);
|
command_event(CMD_EVENT_LOAD_CORE, NULL);
|
||||||
#else
|
#else
|
||||||
|
@ -2469,6 +2470,7 @@ bool task_push_load_content_with_new_core_from_menu(
|
||||||
|
|
||||||
path_set(RARCH_PATH_CONTENT, fullpath);
|
path_set(RARCH_PATH_CONTENT, fullpath);
|
||||||
path_set(RARCH_PATH_CORE, core_path);
|
path_set(RARCH_PATH_CORE, core_path);
|
||||||
|
path_clear(RARCH_PATH_CORE_LAST);
|
||||||
|
|
||||||
#ifdef HAVE_DYNAMIC
|
#ifdef HAVE_DYNAMIC
|
||||||
/* Load core */
|
/* Load core */
|
||||||
|
|
Loading…
Reference in New Issue