mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
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:
parent
1ed759aa47
commit
14c2c68683
|
@ -409,11 +409,12 @@ bool FileFilterIndex::showFile(FileData* game)
|
||||||
// in [] from the search string.
|
// in [] from the search string.
|
||||||
if (mTextFilter != "" && mTextRemoveSystem &&
|
if (mTextFilter != "" && mTextRemoveSystem &&
|
||||||
!(Utils::String::toUpper(game->getName().substr(0, game->getName().find_last_of("[")))
|
!(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;
|
return false;
|
||||||
}
|
}
|
||||||
else if (mTextFilter != "" &&
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,8 +124,8 @@ void GuiGamelistFilter::addFiltersToMenu()
|
||||||
|
|
||||||
// Callback function.
|
// Callback function.
|
||||||
auto updateVal = [this](const std::string& newVal) {
|
auto updateVal = [this](const std::string& newVal) {
|
||||||
mTextFilterField->setValue(Utils::String::toUpper(newVal));
|
mTextFilterField->setValue(Utils::String::trim(newVal));
|
||||||
mFilterIndex->setTextFilter(Utils::String::toUpper(newVal));
|
mFilterIndex->setTextFilter(Utils::String::trim(newVal));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Settings::getInstance()->getBool("VirtualKeyboard")) {
|
if (Settings::getInstance()->getBool("VirtualKeyboard")) {
|
||||||
|
|
Loading…
Reference in a new issue