summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/InputConfigDiag.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DolphinWX/InputConfigDiag.cpp')
-rw-r--r--Source/Core/DolphinWX/InputConfigDiag.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/Core/DolphinWX/InputConfigDiag.cpp b/Source/Core/DolphinWX/InputConfigDiag.cpp
index 54efaad3d2..4101dcdbf5 100644
--- a/Source/Core/DolphinWX/InputConfigDiag.cpp
+++ b/Source/Core/DolphinWX/InputConfigDiag.cpp
@@ -172,18 +172,14 @@ void InputConfigDialog::UpdateProfileComboBox()
pname += PROFILES_PATH;
pname += m_config.profile_name;
- CFileSearch::XStringVector exts;
- exts.push_back("*.ini");
- CFileSearch::XStringVector dirs;
- dirs.push_back(pname);
- CFileSearch cfs(exts, dirs);
- const CFileSearch::XStringVector& sv = cfs.GetFileNames();
+ std::vector<std::string> sv = DoFileSearch({"*.ini"}, {pname});
wxArrayString strs;
- for (auto si = sv.cbegin(); si != sv.cend(); ++si)
+ for (const std::string& filename : sv)
{
- std::string str(si->begin() + si->find_last_of('/') + 1 , si->end() - 4) ;
- strs.push_back(StrToWxStr(str));
+ std::string base;
+ SplitPath(filename, nullptr, &base, nullptr);
+ strs.push_back(StrToWxStr(base));
}
for (GamepadPage* page : m_padpages)