mirror of
https://github.com/libretro/RetroArch
synced 2024-07-08 20:25:47 +00:00
Prevent unnecessary variable self-assignments caused by tertiary
operators - also simplify focused variable assignment
This commit is contained in:
parent
0f24d52407
commit
aae8c65880
19
runloop.c
19
runloop.c
|
@ -3214,12 +3214,14 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||||
{
|
{
|
||||||
/* Try to use the polled refresh rate first. */
|
/* Try to use the polled refresh rate first. */
|
||||||
float target_refresh_rate = video_driver_get_refresh_rate();
|
float target_refresh_rate = video_driver_get_refresh_rate();
|
||||||
float video_refresh_rate = settings ? settings->floats.video_refresh_rate : 0.0;
|
|
||||||
|
|
||||||
/* If the above function failed [possibly because it is not
|
/* If the above function failed [possibly because it is not
|
||||||
* implemented], use the refresh rate set in the config instead. */
|
* implemented], use the refresh rate set in the config instead. */
|
||||||
if (target_refresh_rate == 0.0f && video_refresh_rate != 0.0f)
|
if (target_refresh_rate == 0.0f)
|
||||||
target_refresh_rate = video_refresh_rate;
|
{
|
||||||
|
if (settings)
|
||||||
|
target_refresh_rate = settings->floats.video_refresh_rate;
|
||||||
|
}
|
||||||
|
|
||||||
*(float *)data = target_refresh_rate;
|
*(float *)data = target_refresh_rate;
|
||||||
break;
|
break;
|
||||||
|
@ -6430,9 +6432,8 @@ static enum runloop_state_enum runloop_check_state(
|
||||||
{
|
{
|
||||||
bool input_active = bits_any_set(current_bits.data, ARRAY_SIZE(current_bits.data));
|
bool input_active = bits_any_set(current_bits.data, ARRAY_SIZE(current_bits.data));
|
||||||
|
|
||||||
menu_st->input_driver_flushing_input = input_active
|
if (!input_active)
|
||||||
? menu_st->input_driver_flushing_input
|
menu_st->input_driver_flushing_input = (menu_st->input_driver_flushing_input - 1);
|
||||||
: (menu_st->input_driver_flushing_input - 1);
|
|
||||||
|
|
||||||
if (input_active || (menu_st->input_driver_flushing_input > 0))
|
if (input_active || (menu_st->input_driver_flushing_input > 0))
|
||||||
{
|
{
|
||||||
|
@ -6755,8 +6756,10 @@ static enum runloop_state_enum runloop_check_state(
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
focused = pause_nonactive ? is_focused : true;
|
if (pause_nonactive)
|
||||||
focused = focused && !uico_st->is_on_foreground;
|
focused = is_focused && !uico_st->is_on_foreground;
|
||||||
|
else
|
||||||
|
focused = !uico_st->is_on_foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action == old_action)
|
if (action == old_action)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user