Refactor content_load

This commit is contained in:
twinaphex 2016-02-15 04:04:14 +01:00
parent b4b50d1972
commit d4846b9021
3 changed files with 10 additions and 11 deletions

View File

@ -51,6 +51,10 @@
#include "libretro_version_1.h"
#include "verbosity.h"
#ifdef HAVE_MENU
#include "menu/menu_driver.h"
#endif
#ifdef HAVE_CHEEVOS
#include "cheevos.h"
#endif
@ -270,11 +274,17 @@ bool content_load(int argc, char **argv, void *args,
goto error;
}
#ifdef HAVE_MENU
menu_driver_ctl(RARCH_MENU_CTL_SHADER_MANAGER_INIT, NULL);
#endif
event_cmd_ctl(EVENT_CMD_HISTORY_INIT, NULL);
event_cmd_ctl(EVENT_CMD_RESUME, NULL);
event_cmd_ctl(EVENT_CMD_VIDEO_SET_ASPECT_RATIO, NULL);
check_defaults_dirs();
frontend_driver_process_args(rarch_argc_ptr, rarch_argv_ptr);
frontend_driver_content_loaded();
error:
for (i = 0; i < ARRAY_SIZE(argv_copy); i++)

View File

@ -124,9 +124,6 @@ int rarch_main(int argc, char *argv[], void *data)
return ret;
}
event_cmd_ctl(EVENT_CMD_HISTORY_INIT, NULL);
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);

View File

@ -111,10 +111,6 @@ static bool menu_content_load(void)
runloop_msg_queue_push(msg, 1, 1, false);
}
menu_driver_ctl(RARCH_MENU_CTL_SHADER_MANAGER_INIT, NULL);
event_cmd_ctl(EVENT_CMD_HISTORY_INIT, NULL);
if (*fullpath || menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL))
{
struct retro_system_info *info = NULL;
@ -124,10 +120,6 @@ static bool menu_content_load(void)
content_playlist_write_file(g_defaults.history);
}
event_cmd_ctl(EVENT_CMD_VIDEO_SET_ASPECT_RATIO, NULL);
frontend_driver_content_loaded();
return true;
}