Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed May 28, 2016
1 parent bf6fa07 commit eafb235
Showing 1 changed file with 40 additions and 30 deletions.
70 changes: 40 additions & 30 deletions tasks/task_content.c
Original file line number Diff line number Diff line change
Expand Up @@ -1726,37 +1726,52 @@ bool task_push_content_load_default(
void *user_data)
{
settings_t *settings = config_get_ptr();


switch (mode)
{
case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_FROM_PLAYLIST_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI:
case CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE:
#ifdef HAVE_MENU
switch (mode)
{
case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_FROM_PLAYLIST_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI:
case CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE:
if (content_info && !content_info->environ_get)
content_info->environ_get = menu_content_environment_get;
break;
default:
break;
}
if (content_info && !content_info->environ_get)
content_info->environ_get = menu_content_environment_get;
#endif
break;
default:
break;
}

switch (mode)
{
switch (mode)
{
/* Clear content path */
case CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE:
case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU:
case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU:
runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL);
break;
default:
break;
}
}

switch (mode)
{
/* Set content path */
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:
case CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU:
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)fullpath);
break;
default:
break;
}

switch (mode)
{
Expand All @@ -1770,10 +1785,6 @@ bool task_push_content_load_default(
if (!task_load_content(content_info, false))
goto error;
break;
case CONTENT_MODE_LOAD_FROM_CLI:
if (!task_load_content(content_info, false))
goto error;
break;
case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU:
if (!task_load_content(content_info, true))
goto error;
Expand All @@ -1787,28 +1798,27 @@ bool task_push_content_load_default(
#else
break;
#endif
case CONTENT_MODE_LOAD_FROM_CLI:
if (!task_load_content(content_info, false))
goto error;
break;
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU:
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)fullpath);
if (!task_load_content(content_info, true))
goto error;
break;
case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI:
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)fullpath);
if (!task_load_content(content_info, true))
goto error;
break;
case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU:
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)fullpath);
if (!task_load_content(content_info, true))
goto error;
break;
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)fullpath);
if (!task_load_content(content_info, true))
goto error;
break;
case CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU:
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)fullpath);
#ifdef HAVE_DYNAMIC
if (!task_load_content(content_info, true))
goto error;
Expand Down

0 comments on commit eafb235

Please sign in to comment.