summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/filesel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/ui/filesel.cpp')
-rw-r--r--src/frontend/mame/ui/filesel.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/frontend/mame/ui/filesel.cpp b/src/frontend/mame/ui/filesel.cpp
index 6bd84863db7..256834c5de1 100644
--- a/src/frontend/mame/ui/filesel.cpp
+++ b/src/frontend/mame/ui/filesel.cpp
@@ -23,7 +23,6 @@
#include <cstring>
#include <locale>
-#include <codecvt>
namespace ui {
/***************************************************************************
@@ -359,12 +358,11 @@ void menu_file_selector::populate(float &customtop, float &custombottom)
}
// sort the menu entries
- std::wstring_convert<std::codecvt_utf8<wchar_t>> conv;
const std::collate<wchar_t>& coll = std::use_facet<std::collate<wchar_t>>(std::locale());
- std::sort(m_entrylist.begin()+first, m_entrylist.end(), [&coll, &conv](file_selector_entry const &x, file_selector_entry const &y)
+ std::sort(m_entrylist.begin()+first, m_entrylist.end(), [&coll](file_selector_entry const &x, file_selector_entry const &y)
{
- std::wstring xstr = conv.from_bytes(x.basename);
- std::wstring ystr = conv.from_bytes(y.basename);
+ std::wstring xstr = wstring_from_utf8(x.basename);
+ std::wstring ystr = wstring_from_utf8(y.basename);
return coll.compare(xstr.data(), xstr.data()+xstr.size(), ystr.data(), ystr.data()+ystr.size()) < 0;
} );