[Core] Do a case-insensitive compare for extension when launching a path. Fixes #1175.

This commit is contained in:
gibbed 2018-06-09 01:22:45 -05:00
parent c11cce2d3b
commit 5f16e46282
1 changed files with 5 additions and 2 deletions

View File

@ -224,8 +224,11 @@ X_STATUS Emulator::LaunchPath(std::wstring path) {
if (last_dot == std::wstring::npos) {
// Likely an STFS container.
return LaunchStfsContainer(path);
} else if (path.substr(last_dot) == L".xex" ||
path.substr(last_dot) == L".elf") {
};
auto extension = path.substr(last_dot);
std::transform(extension.begin(), extension.end(), extension.begin(),
tolower);
if (extension == L".xex" || extension == L".elf") {
// Treat as a naked xex file.
return LaunchXexFile(path);
} else {