Move menu_action_setting_set_current_string to menu_entries_cbs.c

This commit is contained in:
twinaphex 2014-10-28 21:47:30 +01:00
parent 7f3c1a9f33
commit 576a362032
2 changed files with 18 additions and 17 deletions

View File

@ -52,23 +52,6 @@ int setting_handler(
return 0;
}
int menu_action_setting_set_current_string(
rarch_setting_t *setting, const char *str)
{
strlcpy(setting->value.string, str, setting->size);
if (setting->change_handler)
setting->change_handler(setting);
if (setting->flags & SD_FLAG_EXIT
&& setting->cmd_trigger.triggered)
{
setting->cmd_trigger.triggered = false;
return -1;
}
return 0;
}
int menu_action_set_current_string_based_on_label(
const char *label, const char *str)

View File

@ -113,6 +113,24 @@ unsigned menu_gx_resolutions[GX_RESOLUTIONS_LAST][2] = {
unsigned menu_current_gx_resolution = GX_RESOLUTIONS_640_480;
#endif
int menu_action_setting_set_current_string(
rarch_setting_t *setting, const char *str)
{
strlcpy(setting->value.string, str, setting->size);
if (setting->change_handler)
setting->change_handler(setting);
if (setting->flags & SD_FLAG_EXIT
&& setting->cmd_trigger.triggered)
{
setting->cmd_trigger.triggered = false;
return -1;
}
return 0;
}
static void common_load_content(bool persist)
{
rarch_main_command(persist ? RARCH_CMD_LOAD_CONTENT_PERSIST : RARCH_CMD_LOAD_CONTENT);