mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 11:18:25 +00:00
Create load_content_with_new_core_from_companion_ui
This commit is contained in:
parent
4bbf2ab535
commit
d74f1a56f3
@ -334,11 +334,9 @@ static int win32_drag_query_file(HWND hwnd, WPARAM wparam)
|
||||
const core_info_t *info = (const core_info_t*)&core_info[0];
|
||||
|
||||
if (info)
|
||||
task_push_content_load_default(
|
||||
task_push_content_load_content_with_new_core_from_companion_ui(
|
||||
info->path, NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_PLAIN,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_COMPANION_UI,
|
||||
NULL, NULL);
|
||||
}
|
||||
else
|
||||
|
@ -1462,6 +1462,34 @@ static bool task_loading_from_menu(enum content_mode_load mode)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool task_push_content_load_content_with_new_core_from_companion_ui(
|
||||
const char *core_path,
|
||||
const char *fullpath,
|
||||
content_ctx_info_t *content_info,
|
||||
retro_task_callback_t cb,
|
||||
void *user_data)
|
||||
{
|
||||
/* Set content path */
|
||||
path_set(RARCH_PATH_CONTENT, fullpath);
|
||||
|
||||
/* Set libretro core path */
|
||||
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)core_path);
|
||||
#ifdef HAVE_DYNAMIC
|
||||
command_event(CMD_EVENT_LOAD_CORE, NULL);
|
||||
#endif
|
||||
|
||||
/* Load content */
|
||||
if (!task_load_content_callback(content_info, true, false))
|
||||
return false;
|
||||
|
||||
/* Push quick menu onto menu stack */
|
||||
#ifdef HAVE_MENU
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUICK_MENU, NULL);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool task_push_content_load_default(
|
||||
const char *core_path,
|
||||
const char *fullpath,
|
||||
@ -1490,7 +1518,6 @@ bool task_push_content_load_default(
|
||||
{
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_COMPANION_UI:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
|
||||
path_set(RARCH_PATH_CONTENT, fullpath);
|
||||
@ -1499,19 +1526,6 @@ bool task_push_content_load_default(
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set libretro core path */
|
||||
switch (mode)
|
||||
{
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_COMPANION_UI:
|
||||
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)core_path);
|
||||
#ifdef HAVE_DYNAMIC
|
||||
command_event(CMD_EVENT_LOAD_CORE, NULL);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Preliminary stuff that has to be done before we
|
||||
* load the actual content. Can differ per mode. */
|
||||
switch (mode)
|
||||
@ -1544,7 +1558,6 @@ bool task_push_content_load_default(
|
||||
#endif
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_COMPANION_UI:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
|
||||
if (!task_load_content_callback(content_info, true, loading_from_cli))
|
||||
|
@ -44,8 +44,7 @@ enum content_mode_load
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_COMPANION_UI
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI
|
||||
};
|
||||
|
||||
enum nbio_status_enum
|
||||
@ -151,6 +150,15 @@ bool task_push_content_load_nothing_with_current_core_from_menu(content_ctx_info
|
||||
|
||||
bool task_push_content_load_nothing_with_dummy_core(content_ctx_info_t *content_info);
|
||||
|
||||
bool task_push_content_load_content_with_new_core_from_companion_ui(
|
||||
const char *core_path,
|
||||
const char *fullpath,
|
||||
content_ctx_info_t *content_info,
|
||||
enum rarch_core_type type,
|
||||
enum content_mode_load mode,
|
||||
retro_task_callback_t cb,
|
||||
void *user_data);
|
||||
|
||||
bool task_push_content_load_content_with_new_core_from_menu(
|
||||
const char *core_path,
|
||||
const char *fullpath,
|
||||
|
Loading…
Reference in New Issue
Block a user