mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-20 18:02:12 +00:00
Create task_push_load_content_with_current_core_from_companion_ui
This commit is contained in:
parent
03948eafd3
commit
d3e8e66b9f
@ -316,11 +316,10 @@ static int win32_drag_query_file(HWND hwnd, WPARAM wparam)
|
||||
{
|
||||
/* Our previous core supports the current rom */
|
||||
content_ctx_info_t content_info = {0};
|
||||
task_push_content_load_default(
|
||||
NULL, NULL,
|
||||
task_push_content_load_content_with_current_core_from_companion_ui(
|
||||
NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_PLAIN,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
|
||||
NULL, NULL);
|
||||
return 0;
|
||||
}
|
||||
@ -345,11 +344,10 @@ static int win32_drag_query_file(HWND hwnd, WPARAM wparam)
|
||||
if(DialogBoxParam(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_PICKCORE),
|
||||
hwnd,PickCoreProc,(LPARAM)NULL)==IDOK)
|
||||
{
|
||||
task_push_content_load_default(
|
||||
NULL, NULL,
|
||||
task_push_content_load_content_with_current_core_from_companion_ui(
|
||||
NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_PLAIN,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
|
||||
NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -1542,6 +1542,29 @@ bool task_push_start_builtin_core(
|
||||
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)
|
||||
{
|
||||
/* Set content path */
|
||||
path_set(RARCH_PATH_CONTENT, fullpath);
|
||||
|
||||
/* Load content */
|
||||
if (!task_load_content_callback(content_info, true, 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_content_load_default(
|
||||
const char *core_path,
|
||||
const char *fullpath,
|
||||
@ -1555,7 +1578,6 @@ bool task_push_content_load_default(
|
||||
switch (mode)
|
||||
{
|
||||
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_FFMPEG_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
|
||||
path_set(RARCH_PATH_CONTENT, fullpath);
|
||||
@ -1568,7 +1590,6 @@ bool task_push_content_load_default(
|
||||
switch (mode)
|
||||
{
|
||||
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_FFMPEG_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
|
||||
if (!task_load_content_callback(content_info, true, false))
|
||||
|
@ -40,8 +40,7 @@ enum content_mode_load
|
||||
CONTENT_MODE_LOAD_NONE = 0,
|
||||
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_IMAGEVIEWER_CORE_FROM_MENU
|
||||
};
|
||||
|
||||
enum nbio_status_enum
|
||||
@ -135,6 +134,13 @@ bool task_push_decompress(
|
||||
retro_task_callback_t cb,
|
||||
void *user_data);
|
||||
|
||||
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);
|
||||
|
||||
bool task_push_load_content_from_cli(
|
||||
const char *core_path,
|
||||
const char *fullpath,
|
||||
|
@ -291,12 +291,10 @@ static char** waiting_argv;
|
||||
if (core_name)
|
||||
{
|
||||
content_ctx_info_t content_info = {0};
|
||||
task_push_content_load_default(
|
||||
NULL,
|
||||
task_push_load_content_with_current_core_from_companion_ui(
|
||||
__core.UTF8String,
|
||||
&content_info,
|
||||
CORE_TYPE_PLAIN,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
|
||||
NULL, NULL);
|
||||
}
|
||||
else
|
||||
@ -340,11 +338,10 @@ static void open_core_handler(ui_browser_window_state_t *state, bool result)
|
||||
{
|
||||
content_ctx_info_t content_info = {0};
|
||||
path_clear(RARCH_PATH_CONTENT);
|
||||
task_push_content_load_default(
|
||||
NULL, NULL,
|
||||
task_push_load_content_with_current_core_from_companion_ui(
|
||||
NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_PLAIN,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
|
||||
NULL, NULL);
|
||||
}
|
||||
}
|
||||
@ -371,11 +368,10 @@ static void open_document_handler(ui_browser_window_state_t *state, bool result)
|
||||
if (core_name)
|
||||
{
|
||||
content_ctx_info_t content_info = {0};
|
||||
task_push_content_load_default(
|
||||
NULL, NULL,
|
||||
task_push_content_load_content_with_current_core_from_companion_ui(
|
||||
NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_PLAIN,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
|
||||
NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -633,11 +633,10 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
||||
path_set(RARCH_PATH_CONTENT, win32_file);
|
||||
|
||||
do_wm_close = true;
|
||||
task_push_content_load_default(
|
||||
NULL, NULL,
|
||||
task_push_content_load_content_with_current_core_from_companion_ui(
|
||||
NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_PLAIN,
|
||||
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI,
|
||||
NULL, NULL);
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user