mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 10:21:31 +00:00
Get rid of unnecessary 'change' boolean variable in apply_deferred_settings
This commit is contained in:
parent
1834bad53c
commit
0b8beb8874
@ -309,7 +309,6 @@ static unsigned input_frame(uint64_t trigger_state)
|
|||||||
void apply_deferred_settings(void)
|
void apply_deferred_settings(void)
|
||||||
{
|
{
|
||||||
rarch_setting_t *setting = driver.menu->list_settings;
|
rarch_setting_t *setting = driver.menu->list_settings;
|
||||||
bool change = false;
|
|
||||||
|
|
||||||
for (; setting->type != ST_NONE; setting++)
|
for (; setting->type != ST_NONE; setting++)
|
||||||
{
|
{
|
||||||
@ -321,28 +320,28 @@ void apply_deferred_settings(void)
|
|||||||
if (*setting->value.boolean != setting->original_value.boolean)
|
if (*setting->value.boolean != setting->original_value.boolean)
|
||||||
{
|
{
|
||||||
setting->original_value.boolean = *setting->value.boolean;
|
setting->original_value.boolean = *setting->value.boolean;
|
||||||
change = true;
|
setting->deferred_handler(setting);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ST_INT:
|
case ST_INT:
|
||||||
if (*setting->value.integer != setting->original_value.integer)
|
if (*setting->value.integer != setting->original_value.integer)
|
||||||
{
|
{
|
||||||
setting->original_value.integer = *setting->value.integer;
|
setting->original_value.integer = *setting->value.integer;
|
||||||
change = true;
|
setting->deferred_handler(setting);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ST_UINT:
|
case ST_UINT:
|
||||||
if (*setting->value.unsigned_integer != setting->original_value.unsigned_integer)
|
if (*setting->value.unsigned_integer != setting->original_value.unsigned_integer)
|
||||||
{
|
{
|
||||||
setting->original_value.unsigned_integer = *setting->value.unsigned_integer;
|
setting->original_value.unsigned_integer = *setting->value.unsigned_integer;
|
||||||
change = true;
|
setting->deferred_handler(setting);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ST_FLOAT:
|
case ST_FLOAT:
|
||||||
if (*setting->value.fraction != setting->original_value.fraction)
|
if (*setting->value.fraction != setting->original_value.fraction)
|
||||||
{
|
{
|
||||||
setting->original_value.fraction = *setting->value.fraction;
|
setting->original_value.fraction = *setting->value.fraction;
|
||||||
change = true;
|
setting->deferred_handler(setting);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ST_PATH:
|
case ST_PATH:
|
||||||
@ -350,13 +349,11 @@ void apply_deferred_settings(void)
|
|||||||
case ST_STRING:
|
case ST_STRING:
|
||||||
case ST_BIND:
|
case ST_BIND:
|
||||||
/* always run the deferred write handler */
|
/* always run the deferred write handler */
|
||||||
change = true;
|
setting->deferred_handler(setting);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (change)
|
|
||||||
setting->deferred_handler(setting);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user