minor overlay-related fixes (#14594)

input_overlay_loaded: Only update menu entries if changed

input_overlay_add_inputs: Set 'updated' for analogs when touched
This commit is contained in:
neil4 2022-11-06 10:25:44 -06:00 committed by GitHub
parent 6d34ef46f4
commit 217fba48c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -1217,7 +1217,11 @@ static bool input_overlay_add_inputs_inner(overlay_desc_t *desc,
/* Maybe use some option here instead of 0, only display
* changes greater than some magnitude */
if ((dx * dx) > 0 || (dy * dy) > 0)
{
if (ol_state)
desc->updated = 1;
return true;
}
}
break;
@ -3551,8 +3555,11 @@ static void input_overlay_loaded(retro_task_t *task,
bool refresh = false;
/* Update menu entries */
menu_st->overlay_types = data->overlay_types;
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
if (menu_st->overlay_types != data->overlay_types)
{
menu_st->overlay_types = data->overlay_types;
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
}
/* We can't display when the menu is up */
if ( data->hide_in_menu

View File

@ -176,7 +176,7 @@ struct overlay_desc
/* If true, blocks input from overlapped hitboxes */
bool exclusive;
/* Similar, but only applies after range_mod takes affect */
/* Similar, but only applies after range_mod takes effect */
bool range_mod_exclusive;
bool movable;