diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index ca0f5dfb4..4bf129da8 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -1240,8 +1240,8 @@ void FileData::launchGame() // Update last played time. gameToUpdate->metadata.set("lastplayed", Utils::Time::DateTime(Utils::Time::now())); - // If the cursor is a folder, the "launch file" functionality must have been used, so set - // the lastplayed timestamp for this folder to the same as the launched game. + // If the cursor is on a folder then a folder link must have been configured, so set the + // lastplayed timestamp for this folder to the same as the launched game. FileData* cursor { ViewController::getInstance()->getGamelistView(gameToUpdate->getSystem())->getCursor()}; if (cursor->getType() == FOLDER) diff --git a/es-app/src/MetaData.cpp b/es-app/src/MetaData.cpp index a6b693609..79d8a9efd 100644 --- a/es-app/src/MetaData.cpp +++ b/es-app/src/MetaData.cpp @@ -63,7 +63,7 @@ namespace {"nomultiscrape", MD_BOOL, "false", false, "exclude from multi-scraper", "enter no multi-scrape off/on", false}, {"hidemetadata", MD_BOOL, "false", false, "hide metadata fields", "enter hide metadata off/on", false}, {"controller", MD_CONTROLLER, "", false, "controller", "select controller", true}, - {"launchfile", MD_LAUNCH_FILE, "", false, "launch file", "select launch file", false}, + {"folderlink", MD_FOLDER_LINK, "", false, "folder link", "select folder link", false}, {"lastplayed", MD_TIME, "0", true, "last played", "enter last played date", false} }; // clang-format on diff --git a/es-app/src/MetaData.h b/es-app/src/MetaData.h index 67c4ff821..c4e2ef6bb 100644 --- a/es-app/src/MetaData.h +++ b/es-app/src/MetaData.h @@ -34,7 +34,7 @@ enum MetaDataType { MD_MULTILINE_STRING, MD_CONTROLLER, MD_ALT_EMULATOR, - MD_LAUNCH_FILE, + MD_FOLDER_LINK, MD_PATH, MD_RATING, MD_DATE, diff --git a/es-app/src/Screensaver.cpp b/es-app/src/Screensaver.cpp index d9c521e76..b2e399dc8 100644 --- a/es-app/src/Screensaver.cpp +++ b/es-app/src/Screensaver.cpp @@ -212,16 +212,16 @@ void Screensaver::nextGame() void Screensaver::launchGame() { if (mCurrentGame != nullptr) { - // If the game is inside a folder where a "launch file" entry is present, then jump to + // If the game is inside a folder where a folder link entry is present, then jump to // that folder instead of to the actual game file. Also check the complete hierarchy in - // case launch file entries are set on multiple levels of the folder structure. + // case folder link entries are set on multiple levels. FileData* entry {mCurrentGame}; FileData* selectGame {mCurrentGame}; FileData* launchFolder {nullptr}; while (entry != nullptr) { entry = entry->getParent(); - if (entry != nullptr && entry->metadata.get("launchfile") != "") + if (entry != nullptr && entry->metadata.get("folderlink") != "") launchFolder = entry; } @@ -248,7 +248,7 @@ void Screensaver::goToGame() while (entry != nullptr) { entry = entry->getParent(); - if (entry != nullptr && entry->metadata.get("launchfile") != "") + if (entry != nullptr && entry->metadata.get("folderlink") != "") launchFolder = entry; } diff --git a/es-app/src/guis/GuiGamelistOptions.cpp b/es-app/src/guis/GuiGamelistOptions.cpp index 282194ee5..791a3247f 100644 --- a/es-app/src/guis/GuiGamelistOptions.cpp +++ b/es-app/src/guis/GuiGamelistOptions.cpp @@ -38,7 +38,7 @@ GuiGamelistOptions::GuiGamelistOptions(SystemData* system) , mCancelled {false} , mIsCustomCollection {false} , mIsCustomCollectionGroup {false} - , mLaunchFileOverride {false} + , mFolderLinkOverride {false} , mCustomCollectionSystem {nullptr} { addChild(&mMenu); @@ -234,13 +234,13 @@ GuiGamelistOptions::GuiGamelistOptions(SystemData* system) } } - if (file->getType() == FOLDER && file->metadata.get("launchfile") != "") { + if (file->getType() == FOLDER && file->metadata.get("folderlink") != "") { row.elements.clear(); - row.addElement(std::make_shared("ENTER FOLDER (OVERRIDE LAUNCH FILE)", + row.addElement(std::make_shared("ENTER FOLDER (OVERRIDE FOLDER LINK)", Font::get(FONT_SIZE_MEDIUM), 0x777777FF), true); row.makeAcceptInputHandler([this, file] { - mLaunchFileOverride = true; + mFolderLinkOverride = true; getGamelist()->enterDirectory(file); delete this; }); @@ -328,7 +328,7 @@ GuiGamelistOptions::~GuiGamelistOptions() } if (mSystem->getRootFolder()->getChildren().size() != 0 && mSystem->getName() != "recent" && - !mLaunchFileOverride) + !mFolderLinkOverride) NavigationSounds::getInstance().playThemeNavigationSound(SCROLLSOUND); } diff --git a/es-app/src/guis/GuiGamelistOptions.h b/es-app/src/guis/GuiGamelistOptions.h index e51a1e50e..a8292d91f 100644 --- a/es-app/src/guis/GuiGamelistOptions.h +++ b/es-app/src/guis/GuiGamelistOptions.h @@ -59,7 +59,7 @@ private: bool mCancelled; bool mIsCustomCollection; bool mIsCustomCollectionGroup; - bool mLaunchFileOverride; + bool mFolderLinkOverride; SystemData* mCustomCollectionSystem; std::vector mFirstLetterIndex; std::string mCurrentFirstCharacter; diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index c166f1b45..ac7b1ed9d 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -52,7 +52,7 @@ GuiMetaDataEd::GuiMetaDataEd(MetaDataList* md, , mMediaFilesUpdated {false} , mSavedMediaAndAborted {false} , mInvalidEmulatorEntry {false} - , mInvalidLaunchFileEntry {false} + , mInvalidFolderLinkEntry {false} { if (ViewController::getInstance()->getState().getSystem()->isCustomCollection() || ViewController::getInstance()->getState().getSystem()->getThemeFolder() == @@ -405,7 +405,7 @@ GuiMetaDataEd::GuiMetaDataEd(MetaDataList* md, } break; } - case MD_LAUNCH_FILE: { + case MD_FOLDER_LINK: { ed = std::make_shared( "", Font::get(FONT_SIZE_SMALL, FONT_PATH_LIGHT), 0x777777FF, ALIGN_RIGHT); row.addElement(ed, true); @@ -423,7 +423,7 @@ GuiMetaDataEd::GuiMetaDataEd(MetaDataList* md, std::vector children; if (originalValue != "") - mInvalidLaunchFileEntry = true; + mInvalidFolderLinkEntry = true; for (auto child : mScraperParams.game->getChildrenRecursive()) { if (child->getType() == GAME && child->getCountAsGame() && @@ -433,13 +433,13 @@ GuiMetaDataEd::GuiMetaDataEd(MetaDataList* md, std::string systemPath {child->getSystem()->getRootFolder()->getPath() + "/" + mScraperParams.game->getFileName() + "/"}; if (Utils::String::replace(filePath, systemPath, "") == originalValue) - mInvalidLaunchFileEntry = false; + mInvalidFolderLinkEntry = false; } } // OK callback (apply new value to ed). auto updateVal = [this, ed, originalValue](const std::string& newVal) { - mInvalidLaunchFileEntry = false; + mInvalidFolderLinkEntry = false; ed->setValue(newVal); if (newVal == originalValue) ed->setColor(DEFAULT_TEXTCOLOR); @@ -491,7 +491,7 @@ GuiMetaDataEd::GuiMetaDataEd(MetaDataList* md, clearText->setSelectable(true); row.addElement(clearText, true); row.makeAcceptInputHandler([this, s, ed] { - mInvalidLaunchFileEntry = false; + mInvalidFolderLinkEntry = false; ed->setValue(""); delete s; }); @@ -596,7 +596,7 @@ GuiMetaDataEd::GuiMetaDataEd(MetaDataList* md, if (it->type == MD_ALT_EMULATOR && mInvalidEmulatorEntry) { ed->setValue(ViewController::EXCLAMATION_CHAR + " " + originalValue); } - else if (it->type == MD_LAUNCH_FILE && mInvalidLaunchFileEntry) { + else if (it->type == MD_FOLDER_LINK && mInvalidFolderLinkEntry) { ed->setValue(ViewController::EXCLAMATION_CHAR + " " + originalValue); } else if (it->type == MD_CONTROLLER && mMetaData->get(it->key) != "") { @@ -747,7 +747,7 @@ void GuiMetaDataEd::save() if (key == "altemulator" && mInvalidEmulatorEntry == true) continue; - if (key == "launchfile" && mInvalidLaunchFileEntry) + if (key == "folderlink" && mInvalidFolderLinkEntry) continue; if (key == "controller" && mEditors.at(i)->getValue() != "") { @@ -921,7 +921,7 @@ void GuiMetaDataEd::close() if (key == "altemulator" && mInvalidEmulatorEntry) continue; - if (key == "launchfile" && mInvalidLaunchFileEntry) + if (key == "folderlink" && mInvalidFolderLinkEntry) continue; std::string mMetaDataValue {mMetaData->get(key)}; diff --git a/es-app/src/guis/GuiMetaDataEd.h b/es-app/src/guis/GuiMetaDataEd.h index d2cd26dac..f1a5c6a38 100644 --- a/es-app/src/guis/GuiMetaDataEd.h +++ b/es-app/src/guis/GuiMetaDataEd.h @@ -73,7 +73,7 @@ private: bool mMediaFilesUpdated; bool mSavedMediaAndAborted; bool mInvalidEmulatorEntry; - bool mInvalidLaunchFileEntry; + bool mInvalidFolderLinkEntry; }; #endif // ES_APP_GUIS_GUI_META_DATA_ED_H diff --git a/es-app/src/views/GamelistBase.cpp b/es-app/src/views/GamelistBase.cpp index 06a5ccfd9..394102ad3 100644 --- a/es-app/src/views/GamelistBase.cpp +++ b/es-app/src/views/GamelistBase.cpp @@ -78,18 +78,18 @@ bool GamelistBase::input(InputConfig* config, Input input) // It's a folder. if (cursor->getChildren().size() > 0) { ViewController::getInstance()->cancelViewTransitions(); - // If a "launch file" entry has been set on the folder, then check if it + // If a folder link entry has been set on the folder, then check if it // corresponds to an actual child entry, and if so then launch this child // instead of entering the folder. if (!CollectionSystemsManager::getInstance()->isEditing() && - cursor->metadata.get("launchfile") != "") { - std::string launchFile; - launchFile.append(cursor->getPath()) + cursor->metadata.get("folderlink") != "") { + std::string folderLink; + folderLink.append(cursor->getPath()) .append("/") - .append(Utils::String::replace(cursor->metadata.get("launchfile"), "\\", + .append(Utils::String::replace(cursor->metadata.get("folderlink"), "\\", "/")); for (auto child : cursor->getChildrenRecursive()) { - if (child->getPath() == launchFile) { + if (child->getPath() == folderLink) { pauseViewVideos(); ViewController::getInstance()->cancelViewTransitions(); stopListScrolling(); @@ -599,13 +599,13 @@ void GamelistBase::populateList(const std::vector& files, FileData* f else if ((*it)->getType() == FOLDER && mRoot->getSystem()->getName() != "collections") { if (Settings::getInstance()->getBool("SpecialCharsASCII")) { - if ((*it)->metadata.get("launchfile") != "") + if ((*it)->metadata.get("folderlink") != "") name = "> " + (*it)->getName(); else name = "# " + (*it)->getName(); } else { - if ((*it)->metadata.get("launchfile") != "") + if ((*it)->metadata.get("folderlink") != "") name = ViewController::FOLDERLINK_CHAR + " " + (*it)->getName(); else name = ViewController::FOLDER_CHAR + " " + (*it)->getName();