ui: Added support for shows localised system name in Favorites. (#10455)

This commit is contained in:
k2-git 2022-10-22 00:22:40 +09:00 committed by GitHub
parent 0edeea4869
commit 85cd1ee424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -409,6 +409,7 @@ void menu_select_game::populate(float &customtop, float &custombottom)
[this, &have_prev_selected, &old_item_selected, curitem = 0] (ui_software_info const &info) mutable [this, &have_prev_selected, &old_item_selected, curitem = 0] (ui_software_info const &info) mutable
{ {
have_prev_selected = have_prev_selected || (&info == m_prev_selected); have_prev_selected = have_prev_selected || (&info == m_prev_selected);
ui_system_info const &elem = m_persistent_data.systems()[driver_list::find(info.driver->name)];
if (info.startempty) if (info.startempty)
{ {
if (old_item_selected == -1 && info.shortname == reselect_last::driver()) if (old_item_selected == -1 && info.shortname == reselect_last::driver())
@ -422,13 +423,13 @@ void menu_select_game::populate(float &customtop, float &custombottom)
cloneof = false; cloneof = false;
} }
item_append(info.longname, cloneof ? FLAG_INVERT : 0, (void *)&info); item_append(elem.description, cloneof ? FLAG_INVERT : 0, (void *)&info);
} }
else else
{ {
if (old_item_selected == -1 && info.shortname == reselect_last::driver()) if (old_item_selected == -1 && info.shortname == reselect_last::driver())
old_item_selected = curitem; old_item_selected = curitem;
item_append(info.longname, info.devicetype, info.parentname.empty() ? 0 : FLAG_INVERT, (void *)&info); item_append(elem.description, info.devicetype, info.parentname.empty() ? 0 : FLAG_INVERT, (void *)&info);
} }
curitem++; curitem++;
}); });