[skip ci] fix file assoc always using internal name, fix menu showing wrong time

fixes #126
This commit is contained in:
ITotalJustice
2025-04-22 00:08:26 +01:00
parent 75d3b3ee0d
commit 21f6f4b74d
3 changed files with 28 additions and 20 deletions

View File

@@ -89,6 +89,18 @@ struct FileAssocEntry {
std::string name{}; // ini name
std::vector<std::string> ext{}; // list of ext
std::vector<std::string> database{}; // list of systems
auto IsExtension(std::string_view extension, std::string_view internal_extension) const -> bool {
for (const auto& assoc_ext : ext) {
if (extension.length() == assoc_ext.length() && !strncasecmp(assoc_ext.data(), extension.data(), assoc_ext.length())) {
return true;
}
if (internal_extension.length() == assoc_ext.length() && !strncasecmp(assoc_ext.data(), internal_extension.data(), assoc_ext.length())) {
return true;
}
}
return false;
}
};
struct LastFile {