Use setting_set_with_string_representation in reset_setting function

This commit is contained in:
twinaphex 2015-06-02 11:24:54 +02:00
parent f1c69e79c2
commit a639feb96f

View File

@ -65,7 +65,7 @@ void setting_reset_setting(rarch_setting_t* setting)
*setting->value.fraction = setting->default_value.fraction;
break;
case ST_BIND:
*setting->value.keybind = *setting->default_value.keybind;
setting_set_with_string_representation(setting, setting->default_value.keybind);
break;
case ST_STRING:
case ST_PATH:
@ -73,8 +73,7 @@ void setting_reset_setting(rarch_setting_t* setting)
if (setting->default_value.string)
{
if (setting->type == ST_STRING)
strlcpy(setting->value.string, setting->default_value.string,
setting->size);
setting_set_with_string_representation(setting, setting->default_value.string);
else
fill_pathname_expand_special(setting->value.string,
setting->default_value.string, setting->size);
@ -201,8 +200,7 @@ void setting_set_with_string_representation(rarch_setting_t* setting,
case ST_DIR:
case ST_STRING:
case ST_ACTION:
strlcpy(setting->value.string, value, setting->size);
break;
case ST_BIND:
case ST_BOOL:
if (!strcmp(value, "true"))
*setting->value.boolean = true;
@ -223,8 +221,6 @@ void setting_set_with_string_representation(rarch_setting_t* setting,
break;
case ST_NONE:
break;
case ST_BIND:
break;
}
if (setting->change_handler)