From 7df82adf1e3f31bf028505e9c916ab08f5114535 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 3 Nov 2022 23:58:52 +0100 Subject: [PATCH] Fixed an issue where placeholder entries did not have the correct letter case. --- es-app/src/views/GamelistBase.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/es-app/src/views/GamelistBase.cpp b/es-app/src/views/GamelistBase.cpp index 779a31f38..b99e08bf2 100644 --- a/es-app/src/views/GamelistBase.cpp +++ b/es-app/src/views/GamelistBase.cpp @@ -699,9 +699,20 @@ void GamelistBase::addPlaceholder(FileData* firstEntry) else placeholder = this->mRoot->getSystem()->getPlaceholder(); + auto letterCaseFunc = [this](std::string& name) { + const LetterCase letterCase {mPrimary->getLetterCase()}; + if (letterCase == LetterCase::UPPERCASE) + name = Utils::String::toUpper(name); + else if (letterCase == LetterCase::LOWERCASE) + name = Utils::String::toLower(name); + else if (letterCase == LetterCase::CAPITALIZED) + name = Utils::String::toCapitalized(name); + }; + if (mTextList != nullptr) { TextListComponent::Entry textListEntry; textListEntry.name = placeholder->getName(); + letterCaseFunc(textListEntry.name); textListEntry.object = placeholder; textListEntry.data.entryType = TextListEntryType::SECONDARY; mTextList->addEntry(textListEntry); @@ -709,6 +720,7 @@ void GamelistBase::addPlaceholder(FileData* firstEntry) if (mCarousel != nullptr) { CarouselComponent::Entry carouselEntry; carouselEntry.name = placeholder->getName(); + letterCaseFunc(carouselEntry.name); carouselEntry.object = placeholder; mCarousel->addEntry(carouselEntry, mRoot->getSystem()->getTheme()); }