This commit is contained in:
twinaphex 2017-02-21 16:10:57 +01:00
parent b648f459c4
commit 4bbf2ab535

View File

@ -1445,6 +1445,23 @@ static bool task_load_content_callback(content_ctx_info_t *content_info,
return true;
}
static bool task_loading_from_menu(enum content_mode_load mode)
{
switch (mode)
{
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
return true;
default:
break;
}
return false;
}
bool task_push_content_load_default(
const char *core_path,
const char *fullpath,
@ -1454,7 +1471,8 @@ bool task_push_content_load_default(
retro_task_callback_t cb,
void *user_data)
{
bool loading_from_cli = false;
bool loading_from_cli = false;
bool loading_from_menu = task_loading_from_menu(mode);
/* Clear content path */
switch (mode)
@ -1532,18 +1550,8 @@ bool task_push_content_load_default(
if (!task_load_content_callback(content_info, true, loading_from_cli))
{
#ifdef HAVE_MENU
switch (mode)
{
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
break;
default:
break;
}
if (loading_from_menu)
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
#endif
return false;
}
@ -1555,7 +1563,7 @@ bool task_push_content_load_default(
/* Push quick menu onto menu stack */
#ifdef HAVE_MENU
if (type != CORE_TYPE_DUMMY && mode != CONTENT_MODE_LOAD_FROM_CLI)
if (type != CORE_TYPE_DUMMY && !loading_from_cli)
menu_driver_ctl(RARCH_MENU_CTL_SET_PENDING_QUICK_MENU, NULL);
#endif