diff options
author | 2021-10-09 14:19:35 +1100 | |
---|---|---|
committer | 2021-10-09 14:21:08 +1100 | |
commit | 30dad180dd95191770e5ef1e29b096044b024c4f (patch) | |
tree | 12a1a6e4ba5d7188a38e1da217e0244f95c596e3 /src/frontend/mame/ui/selgame.cpp | |
parent | 38082ccbee749d650ccea886ae376a5d1dec337c (diff) |
frontend: Fixed clone sorting; osd/strconv.cpp: The string_view treatment, and fixed a bug with to/from ANSI codepage.
Diffstat (limited to 'src/frontend/mame/ui/selgame.cpp')
-rw-r--r-- | src/frontend/mame/ui/selgame.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp index 89892664fc0..12aff317f0e 100644 --- a/src/frontend/mame/ui/selgame.cpp +++ b/src/frontend/mame/ui/selgame.cpp @@ -182,8 +182,11 @@ private: // populate parent descriptions while still ordered by shortname populate_parents(); + // get rid of the "empty" driver - we don't need positions to line up any more + m_sorted_list.erase(m_sorted_list.begin() + driver_list::find(GAME_NAME(___empty))); + // sort drivers and notify - std::collate<wchar_t> const &coll = std::use_facet<std::collate<wchar_t>>(std::locale()); + std::collate<wchar_t> const &coll = std::use_facet<std::collate<wchar_t> >(std::locale()); auto const compare_names = [&coll] (std::string const &x, std::string const &y) -> bool { @@ -307,12 +310,12 @@ private: for (int x = 0; x < driver_list::total(); ++x) { game_driver const &driver(driver_list::driver(x)); + ui_system_info &ins(m_sorted_list.emplace_back(driver, x, false)); if (&driver != &GAME_NAME(___empty)) { if (driver.flags & machine_flags::IS_BIOS_ROOT) ++m_bios_count; - ui_system_info &ins(m_sorted_list.emplace_back(driver, x, false)); if (copydesc) ins.description = driver.type.fullname(); |