(menu_setting.c) Cleanups

This commit is contained in:
twinaphex 2017-04-23 13:41:02 +02:00
parent 268a173f44
commit 217e71d568

View File

@ -1499,14 +1499,12 @@ void general_read_handler(void *data)
*setting->value.target.fraction = settings->audio.rate_control_delta;
if (*setting->value.target.fraction < 0.0005)
{
settings->modified = true;
settings->audio.rate_control = false;
configuration_set_bool(settings, settings->audio.rate_control, false);
settings->audio.rate_control_delta = 0.0;
}
else
{
settings->modified = true;
settings->audio.rate_control = true;
configuration_set_bool(settings, settings->audio.rate_control, true);
settings->audio.rate_control_delta = *setting->value.target.fraction;
}
break;
@ -1619,14 +1617,12 @@ void general_write_handler(void *data)
case MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA:
if (*setting->value.target.fraction < 0.0005)
{
settings->modified = true;
settings->audio.rate_control = false;
configuration_set_bool(settings, settings->audio.rate_control, false);
settings->audio.rate_control_delta = 0.0;
}
else
{
settings->modified = true;
settings->audio.rate_control = true;
configuration_set_bool(settings, settings->audio.rate_control, true);
settings->audio.rate_control_delta = *setting->value.target.fraction;
}
break;