diff --git a/es-app/src/guis/GuiGameScraper.cpp b/es-app/src/guis/GuiGameScraper.cpp index 7783d9ecf..a7709f6ea 100644 --- a/es-app/src/guis/GuiGameScraper.cpp +++ b/es-app/src/guis/GuiGameScraper.cpp @@ -15,6 +15,7 @@ #include "components/TextComponent.h" #include "views/ViewController.h" #include "FileData.h" +#include "MameNames.h" #include "SystemData.h" GuiGameScraper::GuiGameScraper( @@ -32,8 +33,22 @@ GuiGameScraper::GuiGameScraper( // Row 0 is a spacer. - mGameName = std::make_shared(mWindow, - Utils::FileSystem::getFileName(mSearchParams.game->getPath()) + + std::string scrapeName; + + if (Settings::getInstance()->getBool("ScraperSearchMetadataName")) { + scrapeName = mSearchParams.game->getName(); + } + else { + if (params.game->isArcadeGame() && + Settings::getInstance()->getString("Scraper") == "thegamesdb") + scrapeName = Utils::FileSystem::getFileName(mSearchParams.game->getPath()) + " (" + + MameNames::getInstance()->getCleanName(mSearchParams.game->getCleanName()) + + ")"; + else + scrapeName = Utils::FileSystem::getFileName(mSearchParams.game->getPath()); + } + + mGameName = std::make_shared(mWindow, scrapeName + ((mSearchParams.game->getType() == FOLDER) ? " " + ViewController::FOLDER_CHAR : ""), Font::get(FONT_SIZE_MEDIUM), 0x777777FF, ALIGN_CENTER); mGrid.setEntry(mGameName, Vector2i(0, 1), false, true); diff --git a/es-app/src/guis/GuiScraperMulti.cpp b/es-app/src/guis/GuiScraperMulti.cpp index 30f574138..c9f0c8908 100644 --- a/es-app/src/guis/GuiScraperMulti.cpp +++ b/es-app/src/guis/GuiScraperMulti.cpp @@ -18,6 +18,7 @@ #include "guis/GuiScraperSearch.h" #include "views/ViewController.h" #include "Gamelist.h" +#include "MameNames.h" #include "SystemData.h" #include "Window.h" @@ -130,10 +131,24 @@ void GuiScraperMulti::doNextSearch() std::stringstream ss; mSystem->setText(Utils::String::toUpper(mSearchQueue.front().system->getFullName())); + std::string scrapeName; + + if (Settings::getInstance()->getBool("ScraperSearchMetadataName")) { + scrapeName = mSearchQueue.front().game->getName(); + } + else { + if (mSearchQueue.front().game->isArcadeGame() && + Settings::getInstance()->getString("Scraper") == "thegamesdb") + scrapeName = Utils::FileSystem::getFileName(mSearchQueue.front().game->getPath()) + + " (" + MameNames::getInstance()->getCleanName(mSearchQueue.front().game-> + getCleanName()) + ")"; + else + scrapeName = Utils::FileSystem::getFileName(mSearchQueue.front().game->getPath()); + } + // Update subtitle. ss.str(""); - ss << "GAME " << (mCurrentGame + 1) << " OF " << mTotalGames << " - " << - Utils::FileSystem::getFileName(mSearchQueue.front().game->getPath()) << + ss << "GAME " << (mCurrentGame + 1) << " OF " << mTotalGames << " - " << scrapeName << ((mSearchQueue.front().game->getType() == FOLDER) ? " " + ViewController::FOLDER_CHAR : ""); mSubtitle->setText(ss.str());