From 6e5f4125e32f545a61e611720fd30c051b691d62 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sun, 16 Jan 2022 16:38:11 -0800 Subject: Use Common::ToLower and Common::ToUpper --- Source/Core/UICommon/GameFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/UICommon/GameFile.cpp') diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp index b9c5db1379..8c7c59330f 100644 --- a/Source/Core/UICommon/GameFile.cpp +++ b/Source/Core/UICommon/GameFile.cpp @@ -610,7 +610,7 @@ std::string GameFile::GetNetPlayName(const Core::TitleDatabase& title_database) int disc_number = GetDiscNumber() + 1; std::string lower_name = name; - std::transform(lower_name.begin(), lower_name.end(), lower_name.begin(), ::tolower); + Common::ToLower(&lower_name); if (disc_number > 1 && lower_name.find(fmt::format("disc {}", disc_number)) == std::string::npos && lower_name.find(fmt::format("disc{}", disc_number)) == std::string::npos) @@ -786,7 +786,7 @@ std::string GameFile::GetFileFormatName() const case DiscIO::Platform::ELFOrDOL: { std::string extension = GetExtension(); - std::transform(extension.begin(), extension.end(), extension.begin(), ::toupper); + Common::ToUpper(&extension); // substr removes the dot return extension.substr(std::min(1, extension.size())); -- cgit v1.2.3 From 43e146a1d5c327d49fdacddb7a5a7e7f0307fab8 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Thu, 13 Jan 2022 12:06:02 -0800 Subject: GameList: Convert file extensions to lowercase This means that dol/elf files with upercase extensions (e.g. BOOT.DOL) are properly detected. --- Source/Core/UICommon/GameFile.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/UICommon/GameFile.cpp') diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp index 8c7c59330f..d87fb9d168 100644 --- a/Source/Core/UICommon/GameFile.cpp +++ b/Source/Core/UICommon/GameFile.cpp @@ -387,6 +387,7 @@ std::string GameFile::GetExtension() const { std::string extension; SplitPath(m_file_path, nullptr, nullptr, &extension); + Common::ToLower(&extension); return extension; } -- cgit v1.2.3