Game name filter input is not converted to uppercase any longer.

Also added trimming of leading and ending whitespace characters.
This commit is contained in:
Leon Styhre 2021-11-05 10:32:24 +01:00
parent 1ed759aa47
commit 14c2c68683
2 changed files with 5 additions and 4 deletions

View file

@ -409,11 +409,12 @@ bool FileFilterIndex::showFile(FileData* game)
// in [] from the search string.
if (mTextFilter != "" && mTextRemoveSystem &&
!(Utils::String::toUpper(game->getName().substr(0, game->getName().find_last_of("[")))
.find(mTextFilter) != std::string::npos)) {
.find(Utils::String::toUpper(mTextFilter)) != std::string::npos)) {
return false;
}
else if (mTextFilter != "" &&
!(Utils::String::toUpper(game->getName()).find(mTextFilter) != std::string::npos)) {
!(Utils::String::toUpper(game->getName()).find(Utils::String::toUpper(mTextFilter)) !=
std::string::npos)) {
return false;
}

View file

@ -124,8 +124,8 @@ void GuiGamelistFilter::addFiltersToMenu()
// Callback function.
auto updateVal = [this](const std::string& newVal) {
mTextFilterField->setValue(Utils::String::toUpper(newVal));
mFilterIndex->setTextFilter(Utils::String::toUpper(newVal));
mTextFilterField->setValue(Utils::String::trim(newVal));
mFilterIndex->setTextFilter(Utils::String::trim(newVal));
};
if (Settings::getInstance()->getBool("VirtualKeyboard")) {