Refactor content_load
This commit is contained in:
parent
b4b50d1972
commit
d4846b9021
10
content.c
10
content.c
|
@ -51,6 +51,10 @@
|
||||||
#include "libretro_version_1.h"
|
#include "libretro_version_1.h"
|
||||||
#include "verbosity.h"
|
#include "verbosity.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
#include "menu/menu_driver.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CHEEVOS
|
#ifdef HAVE_CHEEVOS
|
||||||
#include "cheevos.h"
|
#include "cheevos.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -270,11 +274,17 @@ bool content_load(int argc, char **argv, void *args,
|
||||||
goto error;
|
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_RESUME, NULL);
|
||||||
|
event_cmd_ctl(EVENT_CMD_VIDEO_SET_ASPECT_RATIO, NULL);
|
||||||
|
|
||||||
check_defaults_dirs();
|
check_defaults_dirs();
|
||||||
|
|
||||||
frontend_driver_process_args(rarch_argc_ptr, rarch_argv_ptr);
|
frontend_driver_process_args(rarch_argc_ptr, rarch_argv_ptr);
|
||||||
|
frontend_driver_content_loaded();
|
||||||
|
|
||||||
error:
|
error:
|
||||||
for (i = 0; i < ARRAY_SIZE(argv_copy); i++)
|
for (i = 0; i < ARRAY_SIZE(argv_copy); i++)
|
||||||
|
|
|
@ -124,9 +124,6 @@ int rarch_main(int argc, char *argv[], void *data)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
event_cmd_ctl(EVENT_CMD_HISTORY_INIT, NULL);
|
|
||||||
|
|
||||||
|
|
||||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||||
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
|
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
|
||||||
|
|
||||||
|
|
|
@ -111,10 +111,6 @@ static bool menu_content_load(void)
|
||||||
runloop_msg_queue_push(msg, 1, 1, false);
|
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))
|
if (*fullpath || menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL))
|
||||||
{
|
{
|
||||||
struct retro_system_info *info = NULL;
|
struct retro_system_info *info = NULL;
|
||||||
|
@ -124,10 +120,6 @@ static bool menu_content_load(void)
|
||||||
content_playlist_write_file(g_defaults.history);
|
content_playlist_write_file(g_defaults.history);
|
||||||
}
|
}
|
||||||
|
|
||||||
event_cmd_ctl(EVENT_CMD_VIDEO_SET_ASPECT_RATIO, NULL);
|
|
||||||
|
|
||||||
frontend_driver_content_loaded();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue