Fix game title sorting - Grid view (#2341)

This commit is contained in:
DanielSvoboda 2025-02-04 03:49:16 -03:00 committed by GitHub
parent 8ad650582a
commit 97441b62d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,10 @@ public:
QVector<GameInfo> m_games;
static bool CompareStrings(GameInfo& a, GameInfo& b) {
return a.name < b.name;
std::string name_a = a.name, name_b = b.name;
std::transform(name_a.begin(), name_a.end(), name_a.begin(), ::tolower);
std::transform(name_b.begin(), name_b.end(), name_b.begin(), ::tolower);
return name_a < name_b;
}
static GameInfo readGameInfo(const std::filesystem::path& filePath) {
@ -72,4 +75,4 @@ public:
}
return game;
}
};
};