menu_content_load - cleanup

This commit is contained in:
twinaphex 2016-01-25 05:31:21 +01:00
parent 22bf74ff37
commit 4381370f35
3 changed files with 3 additions and 19 deletions

View File

@ -99,7 +99,7 @@ static void menu_content_environment_get(int *argc, char *argv[],
* Returns: true (1) if successful, otherwise false (0). * Returns: true (1) if successful, otherwise false (0).
**/ **/
bool menu_content_load(enum rarch_core_type type) bool menu_content_load(void)
{ {
bool msg_force = true; bool msg_force = true;
char *fullpath = NULL; char *fullpath = NULL;

View File

@ -36,7 +36,7 @@ extern "C" {
* *
* Returns: true (1) if successful, otherwise false (0). * Returns: true (1) if successful, otherwise false (0).
**/ **/
bool menu_content_load(enum rarch_core_type type); bool menu_content_load(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -1410,27 +1410,11 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
#endif #endif
break; break;
case RARCH_CTL_LOAD_CONTENT: case RARCH_CTL_LOAD_CONTENT:
#ifdef HAVE_MENU
/* If content loading fails, we go back to menu. */
if (!menu_content_load(CORE_TYPE_PLAIN))
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
#endif
frontend_driver_content_loaded();
break;
#ifdef HAVE_FFMPEG
case RARCH_CTL_LOAD_CONTENT_FFMPEG: case RARCH_CTL_LOAD_CONTENT_FFMPEG:
#ifdef HAVE_MENU
/* If content loading fails, we go back to menu. */
if (!menu_content_load(CORE_TYPE_FFMPEG))
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
#endif
frontend_driver_content_loaded();
break;
#endif
case RARCH_CTL_LOAD_CONTENT_IMAGEVIEWER: case RARCH_CTL_LOAD_CONTENT_IMAGEVIEWER:
#ifdef HAVE_MENU #ifdef HAVE_MENU
/* If content loading fails, we go back to menu. */ /* If content loading fails, we go back to menu. */
if (!menu_content_load(CORE_TYPE_IMAGEVIEWER)) if (!menu_content_load())
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL); rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
#endif #endif
frontend_driver_content_loaded(); frontend_driver_content_loaded();