[Core] Use UTF8-aware lower.

This commit is contained in:
gibbed 2020-04-13 10:53:54 -05:00 committed by Rick Gibbed
parent a7d4d6ee70
commit ce34e1cbb9
1 changed files with 1 additions and 3 deletions

View File

@ -254,9 +254,7 @@ X_STATUS Emulator::LaunchPath(const std::filesystem::path& path) {
// Likely an STFS container.
return LaunchStfsContainer(path);
};
auto extension = xe::path_to_utf8(path.extension());
std::transform(extension.begin(), extension.end(), extension.begin(),
tolower);
auto extension = xe::utf8::lower_ascii(xe::path_to_utf8(path.extension()));
if (extension == ".xex" || extension == ".elf" || extension == ".exe") {
// Treat as a naked xex file.
return LaunchXexFile(path);