ui/selgame.cpp: Fixed display of software favourites.

This commit is contained in:
Vas Crabb 2022-10-30 03:35:07 +11:00
parent de835f1b02
commit 8f1c657734

View File

@ -409,7 +409,6 @@ void menu_select_game::populate(float &customtop, float &custombottom)
[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);
ui_system_info const &elem = m_persistent_data.systems()[driver_list::find(info.driver->name)];
if (info.startempty)
{
if (old_item_selected == -1 && info.shortname == reselect_last::driver())
@ -423,13 +422,14 @@ void menu_select_game::populate(float &customtop, float &custombottom)
cloneof = false;
}
item_append(elem.description, cloneof ? FLAG_INVERT : 0, (void *)&info);
ui_system_info const &sysinfo = m_persistent_data.systems()[driver_list::find(info.driver->name)];
item_append(sysinfo.description, cloneof ? FLAG_INVERT : 0, (void *)&info);
}
else
{
if (old_item_selected == -1 && info.shortname == reselect_last::driver())
old_item_selected = curitem;
item_append(elem.description, info.devicetype, info.parentname.empty() ? 0 : FLAG_INVERT, (void *)&info);
item_append(info.longname, info.devicetype, info.parentname.empty() ? 0 : FLAG_INVERT, (void *)&info);
}
curitem++;
});
@ -503,7 +503,7 @@ void menu_select_game::build_available_list()
// now check and include NONE_NEEDED
if (!ui().options().hide_romless())
{
// FIXME: can't use the convenience macros tiny ROM entries
// FIXME: can't use the convenience macros with tiny ROM entries
auto const is_required_rom =
[] (tiny_rom_entry const &rom) { return ROMENTRY_ISFILE(rom) && !ROM_ISOPTIONAL(rom) && !std::strchr(rom.hashdata, '!'); };
for (std::size_t x = 0; total > x; ++x)
@ -683,7 +683,7 @@ void menu_select_game::inkey_select_favorite(const event *menu_event)
}
return;
}
else if (ui_swinfo->startempty == 1)
else if (ui_swinfo->startempty)
{
driver_enumerator enumerator(machine().options(), *ui_swinfo->driver);
enumerator.next();