mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-22 11:04:35 +00:00
(RARCH_CONSOLE) Do early initing of audio/video/input - add
hack to settings.c to progress beyond assert
This commit is contained in:
parent
d9ee3e54ec
commit
33ae5b3e3d
@ -25,6 +25,26 @@
|
||||
#include "frontend_ps3.c"
|
||||
#endif
|
||||
|
||||
#undef main
|
||||
|
||||
static void init_drivers_console(void)
|
||||
{
|
||||
config_set_defaults();
|
||||
rarch_settings_set_default();
|
||||
|
||||
init_drivers_pre();
|
||||
|
||||
rarch_config_load();
|
||||
|
||||
driver.input_data = driver.input->init();
|
||||
rarch_input_set_controls_default(driver.input);
|
||||
|
||||
driver.input->post_init();
|
||||
|
||||
driver.video->start();
|
||||
init_audio();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
system_init();
|
||||
@ -32,14 +52,7 @@ int main(int argc, char *argv[])
|
||||
rarch_main_clear_state();
|
||||
get_environment_settings(argc, argv);
|
||||
|
||||
config_set_defaults();
|
||||
|
||||
init_drivers_pre();
|
||||
driver.input->init();
|
||||
|
||||
rarch_settings_set_default();
|
||||
rarch_input_set_controls_default(driver.input);
|
||||
rarch_config_load();
|
||||
init_drivers_console();
|
||||
|
||||
#ifdef HAVE_LIBRETRO_MANAGEMENT
|
||||
char core_exe_path[PATH_MAX];
|
||||
@ -62,11 +75,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
init_libretro_sym();
|
||||
|
||||
driver.input->post_init();
|
||||
system_post_init();
|
||||
|
||||
driver.video->start();
|
||||
|
||||
menu_init();
|
||||
|
||||
system_process_args(argc, argv);
|
||||
|
@ -216,6 +216,12 @@ void config_set_defaults(void)
|
||||
g_settings.network_cmd_port = network_cmd_port;
|
||||
g_settings.stdin_cmd_enable = stdin_cmd_enable;
|
||||
|
||||
#ifdef RARCH_CONSOLE
|
||||
//hack - need this to get past assert() during premature video/audio/input
|
||||
//init on consoles
|
||||
g_settings.audio.in_rate = out_rate;
|
||||
#endif
|
||||
|
||||
rarch_assert(sizeof(g_settings.input.binds[0]) >= sizeof(retro_keybinds_1));
|
||||
rarch_assert(sizeof(g_settings.input.binds[1]) >= sizeof(retro_keybinds_rest));
|
||||
memcpy(g_settings.input.binds[0], retro_keybinds_1, sizeof(retro_keybinds_1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user