Remove RARCH_CTL_CORE_OPTIONS_INTL_INIT

This commit is contained in:
twinaphex 2020-02-27 08:51:03 +01:00
parent fb223ac377
commit 602623dc50
2 changed files with 21 additions and 21 deletions

View File

@ -1253,6 +1253,8 @@ static struct bsv_state bsv_movie_state;
/* Forward declarations */ /* Forward declarations */
static void retroarch_core_options_intl_init(const struct
retro_core_options_intl *core_options_intl);
static void ui_companion_driver_toggle(bool force); static void ui_companion_driver_toggle(bool force);
static const void *location_driver_find_handle(int idx); static const void *location_driver_find_handle(int idx);
@ -9571,7 +9573,8 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
RARCH_LOG("[Environ]: RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL.\n"); RARCH_LOG("[Environ]: RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL.\n");
retroarch_deinit_core_options(); retroarch_deinit_core_options();
rarch_ctl(RARCH_CTL_CORE_OPTIONS_INTL_INIT, data); retroarch_core_options_intl_init((const struct
retro_core_options_intl *)data);
break; break;
@ -26203,6 +26206,23 @@ void retroarch_init_task_queue(void)
task_queue_init(threaded_enable, runloop_task_msg_queue_push); task_queue_init(threaded_enable, runloop_task_msg_queue_push);
} }
static void retroarch_core_options_intl_init(const struct
retro_core_options_intl *core_options_intl)
{
/* Parse core_options_intl to create option definitions array */
struct retro_core_option_definition *option_defs =
core_option_manager_get_definitions(core_options_intl);
if (option_defs)
{
/* Initialise core options */
rarch_init_core_options(option_defs);
/* Clean up */
free(option_defs);
}
}
bool rarch_ctl(enum rarch_ctl_state state, void *data) bool rarch_ctl(enum rarch_ctl_state state, void *data)
{ {
switch(state) switch(state)
@ -26441,25 +26461,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
} }
} }
break; break;
case RARCH_CTL_CORE_OPTIONS_INTL_INIT:
{
const struct retro_core_options_intl *core_options_intl =
(const struct retro_core_options_intl*)data;
/* Parse core_options_intl to create option definitions array */
struct retro_core_option_definition *option_defs =
core_option_manager_get_definitions(core_options_intl);
if (option_defs)
{
/* Initialise core options */
rarch_init_core_options(option_defs);
/* Clean up */
free(option_defs);
}
}
break;
case RARCH_CTL_NONE: case RARCH_CTL_NONE:

View File

@ -159,7 +159,6 @@ enum rarch_ctl_state
RARCH_CTL_CORE_OPTIONS_LIST_GET, RARCH_CTL_CORE_OPTIONS_LIST_GET,
RARCH_CTL_CORE_OPTION_PREV, RARCH_CTL_CORE_OPTION_PREV,
RARCH_CTL_CORE_OPTION_NEXT, RARCH_CTL_CORE_OPTION_NEXT,
RARCH_CTL_CORE_OPTIONS_INTL_INIT,
RARCH_CTL_CORE_IS_RUNNING, RARCH_CTL_CORE_IS_RUNNING,
/* BSV Movie */ /* BSV Movie */