summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-10-09 14:19:35 +1100
committer Vas Crabb <vas@vastheman.com>2021-10-09 14:21:08 +1100
commit30dad180dd95191770e5ef1e29b096044b024c4f (patch)
tree12a1a6e4ba5d7188a38e1da217e0244f95c596e3 /src/frontend/mame
parent38082ccbee749d650ccea886ae376a5d1dec337c (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')
-rw-r--r--src/frontend/mame/ui/selgame.cpp7
-rw-r--r--src/frontend/mame/ui/selsoft.cpp2
2 files changed, 6 insertions, 3 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();
diff --git a/src/frontend/mame/ui/selsoft.cpp b/src/frontend/mame/ui/selsoft.cpp
index 8e48cbd51cb..a9d78968d64 100644
--- a/src/frontend/mame/ui/selsoft.cpp
+++ b/src/frontend/mame/ui/selsoft.cpp
@@ -218,7 +218,7 @@ public:
}
// sort array
- 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
{