mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-21 18:25:02 +00:00
Use setting_set_with_string_representation in reset_setting function
This commit is contained in:
parent
f1c69e79c2
commit
a639feb96f
10
settings.c
10
settings.c
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user