mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
(task_content.c) Cut down on some code duplication
This commit is contained in:
parent
72edc1ac7c
commit
6248b1f30a
@ -2202,11 +2202,7 @@ bool task_push_load_content_from_cli(
|
|||||||
retro_task_callback_t cb,
|
retro_task_callback_t cb,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
/* Load content */
|
return task_load_content_internal(content_info, true, true, false);
|
||||||
if (!task_load_content_internal(content_info, true, true, false))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool task_push_start_builtin_core(
|
bool task_push_start_builtin_core(
|
||||||
@ -2237,38 +2233,6 @@ bool task_push_start_builtin_core(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool task_push_load_content_with_current_core_from_companion_ui(
|
|
||||||
const char *fullpath,
|
|
||||||
content_ctx_info_t *content_info,
|
|
||||||
enum rarch_core_type type,
|
|
||||||
retro_task_callback_t cb,
|
|
||||||
void *user_data)
|
|
||||||
{
|
|
||||||
content_state_t *p_content = content_state_get_ptr();
|
|
||||||
|
|
||||||
path_set(RARCH_PATH_CONTENT, fullpath);
|
|
||||||
|
|
||||||
/* TODO/FIXME: Enable setting of these values
|
|
||||||
* via function arguments */
|
|
||||||
p_content->companion_ui_db_name[0] = '\0';
|
|
||||||
p_content->companion_ui_crc32[0] = '\0';
|
|
||||||
|
|
||||||
/* Load content
|
|
||||||
* > TODO/FIXME: Set loading_from_companion_ui 'false' for
|
|
||||||
* now, until someone can implement the required higher
|
|
||||||
* level functionality in 'win32_common.c' and 'ui_cocoa.m' */
|
|
||||||
if (!task_load_content_internal(content_info, true, false, false))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* Push quick menu onto menu stack */
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
if (type != CORE_TYPE_DUMMY)
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUICK_MENU, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool task_push_load_content_with_core_from_menu(
|
bool task_push_load_content_with_core_from_menu(
|
||||||
const char *fullpath,
|
const char *fullpath,
|
||||||
content_ctx_info_t *content_info,
|
content_ctx_info_t *content_info,
|
||||||
@ -2281,7 +2245,9 @@ bool task_push_load_content_with_core_from_menu(
|
|||||||
/* Load content */
|
/* Load content */
|
||||||
if (!task_load_content_internal(content_info, true, false, false))
|
if (!task_load_content_internal(content_info, true, false, false))
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_MENU
|
||||||
retroarch_menu_running();
|
retroarch_menu_running();
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2294,6 +2260,29 @@ bool task_push_load_content_with_core_from_menu(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool task_push_load_content_with_current_core_from_companion_ui(
|
||||||
|
const char *fullpath,
|
||||||
|
content_ctx_info_t *content_info,
|
||||||
|
enum rarch_core_type type,
|
||||||
|
retro_task_callback_t cb,
|
||||||
|
void *user_data)
|
||||||
|
{
|
||||||
|
content_state_t *p_content = content_state_get_ptr();
|
||||||
|
|
||||||
|
/* TODO/FIXME: Enable setting of these values
|
||||||
|
* via function arguments */
|
||||||
|
p_content->companion_ui_db_name[0] = '\0';
|
||||||
|
p_content->companion_ui_crc32[0] = '\0';
|
||||||
|
|
||||||
|
/* Load content
|
||||||
|
* > TODO/FIXME: Set loading_from_companion_ui 'false' for
|
||||||
|
* now, until someone can implement the required higher
|
||||||
|
* level functionality in 'win32_common.c' and 'ui_cocoa.m' */
|
||||||
|
return task_push_load_content_with_core_from_menu(fullpath,
|
||||||
|
content_info, type, cb, user_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool task_push_load_subsystem_with_core_from_menu(
|
bool task_push_load_subsystem_with_core_from_menu(
|
||||||
const char *fullpath,
|
const char *fullpath,
|
||||||
content_ctx_info_t *content_info,
|
content_ctx_info_t *content_info,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user