std::string FileData::getCleanName() const { std::string stem = mPath.stem().generic_string(); if(mSystem && mSystem->hasPlatformId(PlatformIds::ARCADE) || mSystem->hasPlatformId(PlatformIds::NEOGEO)) stem = PlatformIds::getCleanMameName(stem.c_str()); return removeParenthesis(stem); }
const std::string& CollectionFileData::getName() { if (mDirty) { mCollectionFileName = removeParenthesis(mSourceFileData->metadata.get("name")); boost::trim(mCollectionFileName); mCollectionFileName += " [" + strToUpper(mSourceFileData->getSystem()->getName()) + "]"; mDirty = false; } return mCollectionFileName; }
bool CollectionSystemManager::toggleGameInCollection(FileData* file, std::string collection) { if (file->getType() == GAME) { GuiInfoPopup* s; MetaDataList* md = &file->getSourceFileData()->metadata; std::string value = md->get("favorite"); if (value == "false") { md->set("favorite", "true"); s = new GuiInfoPopup(mWindow, "Added '" + removeParenthesis(file->getName()) + "' to 'Favorites'", 4000); }else { md->set("favorite", "false"); s = new GuiInfoPopup(mWindow, "Removed '" + removeParenthesis(file->getName()) + "' from 'Favorites'", 4000); } mWindow->setInfoPopup(s); updateCollectionSystems(file->getSourceFileData()); return true; } return false; }
std::string FileData::getCleanName() const { return removeParenthesis(this->getDisplayName()); }