From 3649684501f217f168ff64fafb0c7118545c4976 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 25 Sep 2021 10:47:59 +0200 Subject: [PATCH 01/21] Added support for multi-select total count and exclusive multi-select to OptionListComponent. --- es-core/src/components/MenuComponent.h | 1 + es-core/src/components/OptionListComponent.h | 112 ++++++++++++++++--- 2 files changed, 97 insertions(+), 16 deletions(-) diff --git a/es-core/src/components/MenuComponent.h b/es-core/src/components/MenuComponent.h index b0d8e927f..c9c1dc1ba 100644 --- a/es-core/src/components/MenuComponent.h +++ b/es-core/src/components/MenuComponent.h @@ -65,6 +65,7 @@ public: const std::function& callback); void setTitle(std::string title, const std::shared_ptr& font); + std::shared_ptr getList() { return mList; } void setCursorToFirstListEntry() { mList->moveCursor(-mList->getCursorId()); } void setCursorToList() { mGrid.setCursorTo(mList); } diff --git a/es-core/src/components/OptionListComponent.h b/es-core/src/components/OptionListComponent.h index 1510625a4..84fdf9236 100644 --- a/es-core/src/components/OptionListComponent.h +++ b/es-core/src/components/OptionListComponent.h @@ -27,10 +27,14 @@ public: OptionListComponent(Window* window, const HelpStyle& helpstyle, const std::string& name, - bool multiSelect = false) + bool multiSelect = false, + bool multiExclusiveSelect = false, + bool multiShowTotal = false) : GuiComponent(window) , mHelpStyle(helpstyle) , mMultiSelect(multiSelect) + , mMultiExclusiveSelect(multiExclusiveSelect) + , mMultiShowTotal(multiShowTotal) , mName(name) , mText(window) , mLeftArrow(window) @@ -212,6 +216,8 @@ public: return 0; } + void setOverrideMultiText(const std::string& text) { mOverrideMultiText = text; } + HelpStyle getHelpStyle() override { return mHelpStyle; } private: @@ -234,7 +240,15 @@ private: if (mMultiSelect) { // Display the selected entry. std::stringstream ss; - ss << getSelectedObjects().size() << " SELECTED"; + + // For special situations, allow the "selected" text to be overridden to a custom value. + if (mOverrideMultiText != "") + ss << mOverrideMultiText; + else if (mMultiShowTotal) + ss << getSelectedObjects().size() << " (OF " << mEntries.size() << ") SELECTED"; + else + ss << getSelectedObjects().size() << " SELECTED"; + mText.setText(ss.str()); mText.setSize(0, mText.getSize().y); setSize(mText.getSize().x + mRightArrow.getSize().x + @@ -271,6 +285,9 @@ private: } bool mMultiSelect; + bool mMultiExclusiveSelect; + bool mMultiShowTotal; + std::string mOverrideMultiText; std::string mName; TextComponent mText; @@ -295,14 +312,33 @@ private: auto font = Font::get(FONT_SIZE_MEDIUM); ComponentListRow row; + bool hasSelectedRow = false; + + // If the exclusive selection flag has been set, i.e. only a single row can be selected + // at a time, then make sure to gray out and disable any non-selected rows. + if (mParent->mMultiExclusiveSelect) { + for (auto entry : mParent->mEntries) { + if (entry.selected == true) { + hasSelectedRow = true; + break; + } + } + } + // For selecting all/none. - std::vector checkboxes; + std::vector checkBoxes; + std::vector textEntries; for (auto it = mParent->mEntries.begin(); it != mParent->mEntries.end(); it++) { row.elements.clear(); - row.addElement(std::make_shared( - mWindow, Utils::String::toUpper(it->name), font, 0x777777FF), - true); + auto textComponent = std::make_shared( + mWindow, Utils::String::toUpper(it->name), font, 0x777777FF); + row.addElement(textComponent, true); + + if (mParent->mMultiExclusiveSelect && hasSelectedRow && !(*it).selected) { + textComponent.get()->setOpacity(DISABLED_OPACITY); + textComponent.get()->setEnabled(false); + } OptionListData& e = *it; @@ -313,16 +349,53 @@ private: checkbox->setResize(0, font->getLetterHeight()); row.addElement(checkbox, false); + if (mParent->mMultiExclusiveSelect && hasSelectedRow && !(*it).selected) + checkbox.get()->setOpacity(DISABLED_OPACITY); + // Input handler. // Update checkbox state and selected value. row.makeAcceptInputHandler([this, &e, checkbox] { + auto list = mMenu.getList(); + int cursorId = list->getCursorId(); + bool isEnabled = list->getChild(cursorId * 2)->getEnabled(); + + if (mParent->mMultiExclusiveSelect && !isEnabled) + return; + e.selected = !e.selected; checkbox->setImage(e.selected ? CHECKED_PATH : UNCHECKED_PATH); mParent->onSelectedChanged(); + + // When selecting a row and the exclusive selection flag has been set, + // gray out and disable all other rows. + if (mParent->mMultiExclusiveSelect) { + for (unsigned int i = 0; i < mParent->mEntries.size(); i++) { + + bool isSelected = mParent->mEntries[cursorId].selected; + + for (unsigned int i = 0; i < list->getChildCount(); i += 2) { + if (i == static_cast(cursorId) * 2) + continue; + if (isSelected) { + mEnabled = false; + list->getChild(i)->setEnabled(false); + list->getChild(i)->setOpacity(DISABLED_OPACITY); + list->getChild(i + 1)->setOpacity(DISABLED_OPACITY); + } + else { + mEnabled = true; + list->getChild(i)->setEnabled(true); + list->getChild(i)->setOpacity(255); + list->getChild(i + 1)->setOpacity(255); + } + } + } + } }); // For selecting all/none. - checkboxes.push_back(checkbox.get()); + checkBoxes.push_back(checkbox.get()); + textEntries.push_back(textComponent.get()); } else { // Input handler for non-multiselect. @@ -342,18 +415,25 @@ private: mMenu.addButton("BACK", "back", [this] { delete this; }); if (mParent->mMultiSelect) { - mMenu.addButton("SELECT ALL", "select all", [this, checkboxes] { - for (unsigned int i = 0; i < mParent->mEntries.size(); i++) { - mParent->mEntries.at(i).selected = true; - checkboxes.at(i)->setImage(CHECKED_PATH); - } - mParent->onSelectedChanged(); - }); + if (!mParent->mMultiExclusiveSelect) { + mMenu.addButton("SELECT ALL", "select all", [this, checkBoxes] { + for (unsigned int i = 0; i < mParent->mEntries.size(); i++) { + mParent->mEntries.at(i).selected = true; + checkBoxes.at(i)->setImage(CHECKED_PATH); + } + mParent->onSelectedChanged(); + }); + } - mMenu.addButton("SELECT NONE", "select none", [this, checkboxes] { + mMenu.addButton("SELECT NONE", "select none", [this, checkBoxes, textEntries] { for (unsigned int i = 0; i < mParent->mEntries.size(); i++) { mParent->mEntries.at(i).selected = false; - checkboxes.at(i)->setImage(UNCHECKED_PATH); + checkBoxes.at(i)->setImage(UNCHECKED_PATH); + if (mParent->mMultiExclusiveSelect) { + checkBoxes.at(i)->setOpacity(255); + textEntries.at(i)->setOpacity(255); + textEntries.at(i)->setEnabled(true); + } } mParent->onSelectedChanged(); }); From 78db6cd18c213f9ff8c7a67abc9667461a82d847 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 25 Sep 2021 10:54:53 +0200 Subject: [PATCH 02/21] Improvements to the gamelist filter GUI. --- es-app/src/guis/GuiGamelistFilter.cpp | 47 ++++++++++++++++++++++----- es-app/src/guis/GuiGamelistFilter.h | 3 +- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/es-app/src/guis/GuiGamelistFilter.cpp b/es-app/src/guis/GuiGamelistFilter.cpp index 679e785cb..6feda35e7 100644 --- a/es-app/src/guis/GuiGamelistFilter.cpp +++ b/es-app/src/guis/GuiGamelistFilter.cpp @@ -21,7 +21,7 @@ GuiGamelistFilter::GuiGamelistFilter(Window* window, SystemData* system, std::function filterChangedCallback) : GuiComponent(window) - , mMenu(window, "FILTER GAMELIST BY") + , mMenu(window, "FILTER GAMELIST") , mSystem(system) , mFiltersChangedCallback(filterChangedCallback) , mFiltersChanged(false) @@ -92,8 +92,6 @@ void GuiGamelistFilter::resetAllFilters() mFiltersChanged = true; } -GuiGamelistFilter::~GuiGamelistFilter() { mFilterOptions.clear(); } - void GuiGamelistFilter::addFiltersToMenu() { ComponentListRow row; @@ -151,18 +149,49 @@ void GuiGamelistFilter::addFiltersToMenu() it != decls.cend(); it++) { FilterIndexType type = (*it).type; // Type of filter. - // All possible filters for this type. std::map* allKeys = (*it).allIndexKeys; + + bool exclusiveSelect = false; + + if (type == FAVORITES_FILTER || type == KIDGAME_FILTER || type == COMPLETED_FILTER || + type == BROKEN_FILTER) + exclusiveSelect = true; + + // Don't display the hidden games filter if we're actually hiding these games. + if (type == HIDDEN_FILTER) { + if (Settings::getInstance()->getBool("ShowHiddenGames")) + exclusiveSelect = true; + else + continue; + } + std::string menuLabel = (*it).menuLabel; // Text to show in menu. std::shared_ptr> optionList; - // Add genres. - optionList = std::make_shared>(mWindow, getHelpStyle(), - menuLabel, true); + // For bool values, make the selection exclusive so that both True and False can't be + // selected at the same time. This should be changed to a SwitchComponent at some point. + if (exclusiveSelect) + optionList = std::make_shared>(mWindow, getHelpStyle(), + menuLabel, true, true); + else + optionList = std::make_shared>(mWindow, getHelpStyle(), + menuLabel, true, false); + + // Still display fields that can't be filtered in the menu, but notify the user and set + // the OptionListComponent as disabled. + if (allKeys->size() == 1 || allKeys->empty()) { + optionList->setEnabled(false); + optionList->setOpacity(DISABLED_OPACITY); + optionList->setOverrideMultiText("NOTHING TO FILTER"); + } + for (auto it : *allKeys) optionList->add(it.first, it.first, mFilterIndex->isKeyBeingFilteredBy(it.first, type)); - if (allKeys->size() > 0) - mMenu.addWithLabel(menuLabel, optionList); + + if (allKeys->size() == 0) + optionList->add("", "", false); + + mMenu.addWithLabel(menuLabel, optionList); mFilterOptions[type] = optionList; } diff --git a/es-app/src/guis/GuiGamelistFilter.h b/es-app/src/guis/GuiGamelistFilter.h index 90fdc0c02..977f0cb9c 100644 --- a/es-app/src/guis/GuiGamelistFilter.h +++ b/es-app/src/guis/GuiGamelistFilter.h @@ -25,7 +25,8 @@ public: SystemData* system, std::function filtersChangedCallback); - ~GuiGamelistFilter(); + ~GuiGamelistFilter() { mFilterOptions.clear(); } + bool input(InputConfig* config, Input input) override; virtual std::vector getHelpPrompts() override; From 966d2616be5d9f757f4555101c9b873021fc888d Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 25 Sep 2021 11:02:27 +0200 Subject: [PATCH 03/21] Added support for defining custom system sorting using the tag. --- es-app/src/CollectionSystemsManager.cpp | 4 ++-- es-app/src/CollectionSystemsManager.h | 2 +- es-app/src/SystemData.cpp | 19 ++++++++++++++++--- es-app/src/SystemData.h | 3 +++ .../src/guis/GuiCollectionSystemsOptions.cpp | 4 ++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index 282b880a2..b804698a7 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -925,7 +925,7 @@ SystemData* CollectionSystemsManager::addNewCustomCollection(std::string name) CollectionSystemDecl decl = mCollectionSystemDeclsIndex[myCollectionsName]; decl.themeFolder = name; decl.name = name; - decl.longName = name; + decl.fullName = name; return createNewCollectionEntry(name, decl, true, true); } @@ -1113,7 +1113,7 @@ SystemData* CollectionSystemsManager::createNewCollectionEntry(std::string name, bool index, bool custom) { - SystemData* newSys = new SystemData(name, sysDecl.longName, mCollectionEnvData, + SystemData* newSys = new SystemData(name, sysDecl.fullName, "", mCollectionEnvData, sysDecl.themeFolder, true, custom); CollectionSystemData newCollectionData; diff --git a/es-app/src/CollectionSystemsManager.h b/es-app/src/CollectionSystemsManager.h index df976ef93..ff31f88d7 100644 --- a/es-app/src/CollectionSystemsManager.h +++ b/es-app/src/CollectionSystemsManager.h @@ -43,7 +43,7 @@ enum CollectionSystemType { struct CollectionSystemDecl { CollectionSystemType type; std::string name; - std::string longName; + std::string fullName; std::string themeFolder; bool isCustom; }; diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index adaa2c9b6..1ca0cae81 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -178,12 +178,14 @@ void FindRules::loadFindRules() SystemData::SystemData(const std::string& name, const std::string& fullName, + const std::string& sortName, SystemEnvironmentData* envData, const std::string& themeFolder, bool CollectionSystem, bool CustomCollectionSystem) : mName(name) , mFullName(fullName) + , mSortName(sortName) , mEnvData(envData) , mThemeFolder(themeFolder) , mIsCollectionSystem(CollectionSystem) @@ -438,11 +440,13 @@ bool SystemData::loadConfig() system = system.next_sibling("system")) { std::string name; std::string fullname; + std::string sortName; std::string path; std::string themeFolder; name = system.child("name").text().get(); fullname = system.child("fullname").text().get(); + sortName = system.child("systemsortname").text().get(); path = system.child("path").text().get(); auto nameFindFunc = [&] { @@ -583,6 +587,15 @@ bool SystemData::loadConfig() continue; } + if (sortName == "") { + sortName = fullname; + } + else { + LOG(LogDebug) << "SystemData::loadConfig(): System \"" << name + << "\" has a tag set, sorting as \"" << sortName + << "\" instead of \"" << fullname << "\""; + } + // Convert path to generic directory seperators. path = Utils::FileSystem::getGenericPath(path); @@ -601,7 +614,7 @@ bool SystemData::loadConfig() envData->mLaunchCommands = commands; envData->mPlatformIds = platformIds; - SystemData* newSys = new SystemData(name, fullname, envData, themeFolder); + SystemData* newSys = new SystemData(name, fullname, sortName, envData, themeFolder); bool onlyHidden = false; // If the option to show hidden games has been disabled, then check whether all @@ -630,9 +643,9 @@ bool SystemData::loadConfig() } } - // Sort systems by their full names. + // Sort systems by sortName, which will normally be the same as the full name. std::sort(std::begin(sSystemVector), std::end(sSystemVector), - [](SystemData* a, SystemData* b) { return a->getFullName() < b->getFullName(); }); + [](SystemData* a, SystemData* b) { return a->getSortName() < b->getSortName(); }); // Don't load any collections if there are no systems available. if (sSystemVector.size() > 0) diff --git a/es-app/src/SystemData.h b/es-app/src/SystemData.h index 8dd7bd4fd..a89eb4586 100644 --- a/es-app/src/SystemData.h +++ b/es-app/src/SystemData.h @@ -62,6 +62,7 @@ class SystemData public: SystemData(const std::string& name, const std::string& fullName, + const std::string& sortName, SystemEnvironmentData* envData, const std::string& themeFolder, bool CollectionSystem = false, @@ -72,6 +73,7 @@ public: FileData* getRootFolder() const { return mRootFolder; } const std::string& getName() const { return mName; } const std::string& getFullName() const { return mFullName; } + const std::string& getSortName() const { return mSortName; } const std::string& getStartPath() const { return mEnvData->mStartPath; } const std::vector& getExtensions() const { return mEnvData->mSearchExtensions; } const std::string& getThemeFolder() const { return mThemeFolder; } @@ -152,6 +154,7 @@ public: private: std::string mName; std::string mFullName; + std::string mSortName; SystemEnvironmentData* mEnvData; std::string mAlternativeEmulator; std::string mThemeFolder; diff --git a/es-app/src/guis/GuiCollectionSystemsOptions.cpp b/es-app/src/guis/GuiCollectionSystemsOptions.cpp index 59cc0052e..2d1e31059 100644 --- a/es-app/src/guis/GuiCollectionSystemsOptions.cpp +++ b/es-app/src/guis/GuiCollectionSystemsOptions.cpp @@ -52,7 +52,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(Window* window, std::st for (std::map::const_iterator it = autoSystems.cbegin(); it != autoSystems.cend(); it++) - collection_systems_auto->add(it->second.decl.longName, it->second.decl.name, + collection_systems_auto->add(it->second.decl.fullName, it->second.decl.name, it->second.isEnabled); addWithLabel("AUTOMATIC GAME COLLECTIONS", collection_systems_auto); addSaveFunc([this, autoSystems] { @@ -101,7 +101,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(Window* window, std::st for (std::map::const_iterator it = customSystems.cbegin(); it != customSystems.cend(); it++) - collection_systems_custom->add(it->second.decl.longName, it->second.decl.name, + collection_systems_custom->add(it->second.decl.fullName, it->second.decl.name, it->second.isEnabled); addWithLabel("CUSTOM GAME COLLECTIONS", collection_systems_custom); From c85700571d277e2ec3cb5a080f0a39551a7b8774 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 25 Sep 2021 16:16:25 +0200 Subject: [PATCH 04/21] Added a filter for the 'Alternative emulator' field. --- es-app/src/FileFilterIndex.cpp | 66 +++++++++++++++++++++------------- es-app/src/FileFilterIndex.h | 7 +++- 2 files changed, 48 insertions(+), 25 deletions(-) diff --git a/es-app/src/FileFilterIndex.cpp b/es-app/src/FileFilterIndex.cpp index 75daf387f..72671f104 100644 --- a/es-app/src/FileFilterIndex.cpp +++ b/es-app/src/FileFilterIndex.cpp @@ -31,21 +31,23 @@ FileFilterIndex::FileFilterIndex() , mFilterByCompleted(false) , mFilterByBroken(false) , mFilterByHidden(false) + , mFilterByAltemulator(false) { clearAllFilters(); // clang-format off FilterDataDecl filterDecls[] = { - //type //allKeys //filteredBy //filteredKeys //primaryKey //hasSecondaryKey //secondaryKey //menuLabel - {FAVORITES_FILTER, &mFavoritesIndexAllKeys, &mFilterByFavorites, &mFavoritesIndexFilteredKeys, "favorite", false, "", "FAVORITES"}, - {GENRE_FILTER, &mGenreIndexAllKeys, &mFilterByGenre, &mGenreIndexFilteredKeys, "genre", true, "genre", "GENRE"}, - {PLAYER_FILTER, &mPlayersIndexAllKeys, &mFilterByPlayers, &mPlayersIndexFilteredKeys, "players", false, "", "PLAYERS"}, - {PUBDEV_FILTER, &mPubDevIndexAllKeys, &mFilterByPubDev, &mPubDevIndexFilteredKeys, "developer", true, "publisher", "PUBLISHER / DEVELOPER"}, - {RATINGS_FILTER, &mRatingsIndexAllKeys, &mFilterByRatings, &mRatingsIndexFilteredKeys, "rating", false, "", "RATING"}, - {KIDGAME_FILTER, &mKidGameIndexAllKeys, &mFilterByKidGame, &mKidGameIndexFilteredKeys, "kidgame", false, "", "KIDGAME"}, - {COMPLETED_FILTER, &mCompletedIndexAllKeys, &mFilterByCompleted, &mCompletedIndexFilteredKeys, "completed", false, "", "COMPLETED"}, - {BROKEN_FILTER, &mBrokenIndexAllKeys, &mFilterByBroken, &mBrokenIndexFilteredKeys, "broken", false, "", "BROKEN"}, - {HIDDEN_FILTER, &mHiddenIndexAllKeys, &mFilterByHidden, &mHiddenIndexFilteredKeys, "hidden", false, "", "HIDDEN"} + //type //allKeys //filteredBy //filteredKeys //primaryKey //hasSecondaryKey //secondaryKey //menuLabel + {FAVORITES_FILTER, &mFavoritesIndexAllKeys, &mFilterByFavorites, &mFavoritesIndexFilteredKeys, "favorite", false, "", "FAVORITES"}, + {GENRE_FILTER, &mGenreIndexAllKeys, &mFilterByGenre, &mGenreIndexFilteredKeys, "genre", true, "genre", "GENRE"}, + {PLAYER_FILTER, &mPlayersIndexAllKeys, &mFilterByPlayers, &mPlayersIndexFilteredKeys, "players", false, "", "PLAYERS"}, + {PUBDEV_FILTER, &mPubDevIndexAllKeys, &mFilterByPubDev, &mPubDevIndexFilteredKeys, "developer", true, "publisher", "PUBLISHER / DEVELOPER"}, + {RATINGS_FILTER, &mRatingsIndexAllKeys, &mFilterByRatings, &mRatingsIndexFilteredKeys, "rating", false, "", "RATING"}, + {KIDGAME_FILTER, &mKidGameIndexAllKeys, &mFilterByKidGame, &mKidGameIndexFilteredKeys, "kidgame", false, "", "KIDGAME"}, + {COMPLETED_FILTER, &mCompletedIndexAllKeys, &mFilterByCompleted, &mCompletedIndexFilteredKeys, "completed", false, "", "COMPLETED"}, + {BROKEN_FILTER, &mBrokenIndexAllKeys, &mFilterByBroken, &mBrokenIndexFilteredKeys, "broken", false, "", "BROKEN"}, + {HIDDEN_FILTER, &mHiddenIndexAllKeys, &mFilterByHidden, &mHiddenIndexFilteredKeys, "hidden", false, "", "HIDDEN"}, + {ALTEMULATOR_FILTER, &mAltemulatorIndexAllKeys, &mFilterByAltemulator, &mAltemulatorIndexFilteredKeys, "altemulator", false, "", "ALTERNATIVE EMULATOR"} }; // clang-format on @@ -76,6 +78,7 @@ void FileFilterIndex::importIndex(FileFilterIndex* indexToImport) {&mCompletedIndexAllKeys, &(indexToImport->mCompletedIndexAllKeys)}, {&mBrokenIndexAllKeys, &(indexToImport->mBrokenIndexAllKeys)}, {&mHiddenIndexAllKeys, &(indexToImport->mHiddenIndexAllKeys)}, + {&mAltemulatorIndexAllKeys, &(indexToImport->mAltemulatorIndexAllKeys)}, }; std::vector indexImportDecl = std::vector( @@ -111,6 +114,7 @@ void FileFilterIndex::resetIndex() clearIndex(mCompletedIndexAllKeys); clearIndex(mBrokenIndexAllKeys); clearIndex(mHiddenIndexAllKeys); + clearIndex(mAltemulatorIndexAllKeys); } std::string FileFilterIndex::getIndexableKey(FileData* game, @@ -142,14 +146,12 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, case PLAYER_FILTER: { if (getSecondary) break; - key = Utils::String::toUpper(game->metadata.get("players")); break; } case PUBDEV_FILTER: { key = Utils::String::toUpper(game->metadata.get("publisher")); key = Utils::String::trim(key); - if ((getSecondary && !key.empty()) || (!getSecondary && key.empty())) key = Utils::String::toUpper(game->metadata.get("developer")); else @@ -210,6 +212,12 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, key = Utils::String::toUpper(game->metadata.get("hidden")); break; } + case ALTEMULATOR_FILTER: { + if (getSecondary) + break; + key = Utils::String::toUpper(game->metadata.get("altemulator")); + break; + } default: break; } @@ -231,6 +239,7 @@ void FileFilterIndex::addToIndex(FileData* game) manageCompletedEntryInIndex(game); manageBrokenEntryInIndex(game); manageHiddenEntryInIndex(game); + manageAltemulatorEntryInIndex(game); } void FileFilterIndex::removeFromIndex(FileData* game) @@ -244,6 +253,7 @@ void FileFilterIndex::removeFromIndex(FileData* game) manageCompletedEntryInIndex(game, true); manageBrokenEntryInIndex(game, true); manageHiddenEntryInIndex(game, true); + manageAltemulatorEntryInIndex(game, true); } void FileFilterIndex::setFilter(FilterIndexType type, std::vector* values) @@ -339,6 +349,9 @@ void FileFilterIndex::debugPrintIndexes() for (auto x : mHiddenIndexAllKeys) { LOG(LogInfo) << "Hidden Index: " << x.first << ": " << x.second; } + for (auto x : mAltemulatorIndexAllKeys) { + LOG(LogInfo) << "Altemulator Index: " << x.first << ": " << x.second; + } } bool FileFilterIndex::showFile(FileData* game) @@ -415,26 +428,27 @@ bool FileFilterIndex::isFiltered() if (UIModeController::getInstance()->isUIModeKid()) { return (mFilterByText || mFilterByFavorites || mFilterByGenre || mFilterByPlayers || mFilterByPubDev || mFilterByRatings || mFilterByCompleted || mFilterByBroken || - mFilterByHidden); + mFilterByHidden || mFilterByAltemulator); } else { return (mFilterByText || mFilterByFavorites || mFilterByGenre || mFilterByPlayers || mFilterByPubDev || mFilterByRatings || mFilterByKidGame || mFilterByCompleted || - mFilterByBroken || mFilterByHidden); + mFilterByBroken || mFilterByHidden | mFilterByAltemulator); } } bool FileFilterIndex::isKeyBeingFilteredBy(std::string key, FilterIndexType type) { - const FilterIndexType filterTypes[9] = {FAVORITES_FILTER, GENRE_FILTER, PLAYER_FILTER, - PUBDEV_FILTER, RATINGS_FILTER, KIDGAME_FILTER, - COMPLETED_FILTER, BROKEN_FILTER, HIDDEN_FILTER}; - std::vector filterKeysList[9] = { - mFavoritesIndexFilteredKeys, mGenreIndexFilteredKeys, mPlayersIndexFilteredKeys, - mPubDevIndexFilteredKeys, mRatingsIndexFilteredKeys, mKidGameIndexFilteredKeys, - mCompletedIndexFilteredKeys, mBrokenIndexFilteredKeys, mHiddenIndexFilteredKeys}; + const FilterIndexType filterTypes[10] = { + FAVORITES_FILTER, GENRE_FILTER, PLAYER_FILTER, PUBDEV_FILTER, RATINGS_FILTER, + KIDGAME_FILTER, COMPLETED_FILTER, BROKEN_FILTER, HIDDEN_FILTER, ALTEMULATOR_FILTER}; + std::vector filterKeysList[10] = { + mFavoritesIndexFilteredKeys, mGenreIndexFilteredKeys, mPlayersIndexFilteredKeys, + mPubDevIndexFilteredKeys, mRatingsIndexFilteredKeys, mKidGameIndexFilteredKeys, + mCompletedIndexFilteredKeys, mBrokenIndexFilteredKeys, mHiddenIndexFilteredKeys, + mAltemulatorIndexFilteredKeys}; - for (int i = 0; i < 9; i++) { + for (int i = 0; i < 10; i++) { if (filterTypes[i] == type) { for (std::vector::const_iterator it = filterKeysList[i].cbegin(); it != filterKeysList[i].cend(); it++) { @@ -467,7 +481,6 @@ void FileFilterIndex::manageGenreEntryInIndex(FileData* game, bool remove) // Flag for including unknowns. bool includeUnknown = INCLUDE_UNKNOWN; - // Only add unknown in pubdev IF both dev and pub are empty. if (!includeUnknown && (key == UNKNOWN_LABEL || key == "BIOS")) // No valid genre info found. return; @@ -485,7 +498,6 @@ void FileFilterIndex::managePlayerEntryInIndex(FileData* game, bool remove) bool includeUnknown = INCLUDE_UNKNOWN; std::string key = getIndexableKey(game, PLAYER_FILTER, false); - // Only add unknown in pubdev IF both dev and pub are empty. if (!includeUnknown && key == UNKNOWN_LABEL) // No valid player info found. return; @@ -595,6 +607,12 @@ void FileFilterIndex::manageHiddenEntryInIndex(FileData* game, bool remove) manageIndexEntry(&mHiddenIndexAllKeys, key, remove); } +void FileFilterIndex::manageAltemulatorEntryInIndex(FileData* game, bool remove) +{ + std::string key = getIndexableKey(game, ALTEMULATOR_FILTER, false); + manageIndexEntry(&mAltemulatorIndexAllKeys, key, remove); +} + void FileFilterIndex::manageIndexEntry(std::map* index, std::string key, bool remove) diff --git a/es-app/src/FileFilterIndex.h b/es-app/src/FileFilterIndex.h index 18cbf4469..cd2576f39 100644 --- a/es-app/src/FileFilterIndex.h +++ b/es-app/src/FileFilterIndex.h @@ -29,7 +29,8 @@ enum FilterIndexType { KIDGAME_FILTER, COMPLETED_FILTER, BROKEN_FILTER, - HIDDEN_FILTER + HIDDEN_FILTER, + ALTEMULATOR_FILTER }; struct FilterDataDecl { @@ -79,6 +80,7 @@ private: void manageCompletedEntryInIndex(FileData* game, bool remove = false); void manageBrokenEntryInIndex(FileData* game, bool remove = false); void manageHiddenEntryInIndex(FileData* game, bool remove = false); + void manageAltemulatorEntryInIndex(FileData* game, bool remove = false); void manageIndexEntry(std::map* index, std::string key, bool remove); @@ -97,6 +99,7 @@ private: bool mFilterByCompleted; bool mFilterByBroken; bool mFilterByHidden; + bool mFilterByAltemulator; std::map mFavoritesIndexAllKeys; std::map mGenreIndexAllKeys; @@ -107,6 +110,7 @@ private: std::map mCompletedIndexAllKeys; std::map mBrokenIndexAllKeys; std::map mHiddenIndexAllKeys; + std::map mAltemulatorIndexAllKeys; std::vector mFavoritesIndexFilteredKeys; std::vector mGenreIndexFilteredKeys; @@ -117,6 +121,7 @@ private: std::vector mCompletedIndexFilteredKeys; std::vector mBrokenIndexFilteredKeys; std::vector mHiddenIndexFilteredKeys; + std::vector mAltemulatorIndexFilteredKeys; }; #endif // ES_APP_FILE_FILTER_INDEX_H From 53630e3a7a9f7fbfa1bb7bb0f6224e00ea454fbe Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 25 Sep 2021 16:53:30 +0200 Subject: [PATCH 05/21] Blank/unknown values can now be filtered for Genre, Player, Publisher/Developer and Alternative emulator. --- es-app/src/FileFilterIndex.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/es-app/src/FileFilterIndex.cpp b/es-app/src/FileFilterIndex.cpp index 72671f104..0089932cb 100644 --- a/es-app/src/FileFilterIndex.cpp +++ b/es-app/src/FileFilterIndex.cpp @@ -13,6 +13,7 @@ #include "Settings.h" #include "utils/StringUtil.h" #include "views/UIModeController.h" +#include "views/ViewController.h" #include @@ -222,9 +223,16 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, break; } key = Utils::String::trim(key); - if (key.empty() || (type == RATINGS_FILTER && key == "0 STARS")) { + + // Add a dummy value in case there is no metadata defined so we can filter based on this. + if ((type == GENRE_FILTER || type == PLAYER_FILTER || type == PUBDEV_FILTER) && + Utils::String::toUpper(key) == UNKNOWN_LABEL) + key = ViewController::CROSSEDCIRCLE_CHAR + " UNKNOWN"; + else if (type == ALTEMULATOR_FILTER && key.empty()) + key = ViewController::CROSSEDCIRCLE_CHAR + " NONE DEFINED"; + else if (key.empty() || (type == RATINGS_FILTER && key == "0 STARS")) key = UNKNOWN_LABEL; - } + return key; } From 3233288a8c04f0d79f1d1670979d2db1705497d1 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 25 Sep 2021 18:01:41 +0200 Subject: [PATCH 06/21] Improved the string trim function and replaced some inlined occurrences. --- es-app/src/CollectionSystemsManager.cpp | 8 +------- es-app/src/guis/GuiScraperSearch.cpp | 9 +-------- es-app/src/scrapers/GamesDBJSONScraper.cpp | 10 +--------- es-app/src/scrapers/ScreenScraper.cpp | 10 +--------- es-core/src/utils/StringUtil.cpp | 17 ++++++++++++----- 5 files changed, 16 insertions(+), 38 deletions(-) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index b804698a7..df2ed075e 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -555,13 +555,7 @@ std::string CollectionSystemsManager::getValidNewCollectionName(std::string inNa std::string name = inName; // Trim leading and trailing whitespaces. - name.erase(name.begin(), std::find_if(name.begin(), name.end(), [](char c) { - return !std::isspace(static_cast(c)); - })); - name.erase(std::find_if(name.rbegin(), name.rend(), - [](char c) { return !std::isspace(static_cast(c)); }) - .base(), - name.end()); + name = Utils::String::trim(name); if (index == 0) { size_t remove = std::string::npos; diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index d749c1302..cb3ed5ba7 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -794,14 +794,7 @@ void GuiScraperSearch::openInputScreen(ScraperSearchParams& params) { auto searchForFunc = [&](std::string name) { // Trim leading and trailing whitespaces. - name.erase(name.begin(), std::find_if(name.begin(), name.end(), [](char c) { - return !std::isspace(static_cast(c)); - })); - name.erase(std::find_if(name.rbegin(), name.rend(), - [](char c) { return !std::isspace(static_cast(c)); }) - .base(), - name.end()); - + name = Utils::String::trim(name); stop(); mRefinedSearch = true; params.nameOverride = name; diff --git a/es-app/src/scrapers/GamesDBJSONScraper.cpp b/es-app/src/scrapers/GamesDBJSONScraper.cpp index 4c015d38c..327bbef30 100644 --- a/es-app/src/scrapers/GamesDBJSONScraper.cpp +++ b/es-app/src/scrapers/GamesDBJSONScraper.cpp @@ -160,15 +160,7 @@ void thegamesdb_generate_json_scraper_requests( } // Trim leading and trailing whitespaces. - cleanName.erase(cleanName.begin(), - std::find_if(cleanName.begin(), cleanName.end(), [](char c) { - return !std::isspace(static_cast(c)); - })); - cleanName.erase( - std::find_if(cleanName.rbegin(), cleanName.rend(), - [](char c) { return !std::isspace(static_cast(c)); }) - .base(), - cleanName.end()); + cleanName = Utils::String::trim(cleanName); path += "/Games/ByGameName?" + apiKey + "&fields=players,publishers,genres,overview,last_updated,rating," diff --git a/es-app/src/scrapers/ScreenScraper.cpp b/es-app/src/scrapers/ScreenScraper.cpp index afdb9ea00..ea4cb1cab 100644 --- a/es-app/src/scrapers/ScreenScraper.cpp +++ b/es-app/src/scrapers/ScreenScraper.cpp @@ -553,15 +553,7 @@ std::string ScreenScraperRequest::ScreenScraperConfig::getGameSearchUrl( bool singleSearch = false; // Trim leading and trailing whitespaces. - searchName.erase(searchName.begin(), - std::find_if(searchName.begin(), searchName.end(), [](char c) { - return !std::isspace(static_cast(c)); - })); - searchName.erase( - std::find_if(searchName.rbegin(), searchName.rend(), - [](char c) { return !std::isspace(static_cast(c)); }) - .base(), - searchName.end()); + searchName = Utils::String::trim(searchName); // If only whitespaces were entered as the search string, then search using a random string // that will not return any results. This is a quick and dirty way to avoid french error diff --git a/es-core/src/utils/StringUtil.cpp b/es-core/src/utils/StringUtil.cpp index 2bc8798ac..2a7adb093 100644 --- a/es-core/src/utils/StringUtil.cpp +++ b/es-core/src/utils/StringUtil.cpp @@ -564,13 +564,20 @@ namespace Utils std::string trim(const std::string& stringArg) { - const size_t strBegin = stringArg.find_first_not_of(" \t"); - const size_t strEnd = stringArg.find_last_not_of(" \t"); + std::string trimString = stringArg; - if (strBegin == std::string::npos) - return ""; + // Trim leading and trailing whitespaces. + trimString.erase(trimString.begin(), + std::find_if(trimString.begin(), trimString.end(), [](char c) { + return !std::isspace(static_cast(c)); + })); + trimString.erase( + std::find_if(trimString.rbegin(), trimString.rend(), + [](char c) { return !std::isspace(static_cast(c)); }) + .base(), + trimString.end()); - return stringArg.substr(strBegin, strEnd - strBegin + 1); + return trimString; } std::string replace(const std::string& stringArg, From 3d6628f084e59f7e8947d9dcb33b28711de59bcf Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 25 Sep 2021 19:22:59 +0200 Subject: [PATCH 07/21] Massive ~2500% speed improvement for OptionListComponent. --- es-core/src/components/MenuComponent.h | 5 +++-- es-core/src/components/OptionListComponent.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/es-core/src/components/MenuComponent.h b/es-core/src/components/MenuComponent.h index c9c1dc1ba..2604ca837 100644 --- a/es-core/src/components/MenuComponent.h +++ b/es-core/src/components/MenuComponent.h @@ -39,10 +39,11 @@ public: void setNeedsSaving() { mNeedsSaving = true; } - void addRow(const ComponentListRow& row, bool setCursorHere = false) + void addRow(const ComponentListRow& row, bool setCursorHere = false, bool updateRowSize = true) { mList->addRow(row, setCursorHere); - updateSize(); + if (updateRowSize) + updateSize(); } void addWithLabel(const std::string& label, diff --git a/es-core/src/components/OptionListComponent.h b/es-core/src/components/OptionListComponent.h index 84fdf9236..25df35e61 100644 --- a/es-core/src/components/OptionListComponent.h +++ b/es-core/src/components/OptionListComponent.h @@ -409,7 +409,7 @@ private: } // Also set cursor to this row if we're not multi-select and this row is selected. - mMenu.addRow(row, (!mParent->mMultiSelect && it->selected)); + mMenu.addRow(row, (!mParent->mMultiSelect && it->selected), false); } mMenu.addButton("BACK", "back", [this] { delete this; }); From 5f3abed826d4aa80c06050b984f258669b510229 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 25 Sep 2021 19:30:44 +0200 Subject: [PATCH 08/21] Split up the Publisher/Developer filter into two separate filters. --- es-app/src/FileFilterIndex.cpp | 126 ++++++++++++++++----------------- es-app/src/FileFilterIndex.h | 15 ++-- 2 files changed, 71 insertions(+), 70 deletions(-) diff --git a/es-app/src/FileFilterIndex.cpp b/es-app/src/FileFilterIndex.cpp index 0089932cb..e3d315de9 100644 --- a/es-app/src/FileFilterIndex.cpp +++ b/es-app/src/FileFilterIndex.cpp @@ -26,7 +26,8 @@ FileFilterIndex::FileFilterIndex() , mFilterByFavorites(false) , mFilterByGenre(false) , mFilterByPlayers(false) - , mFilterByPubDev(false) + , mFilterByDeveloper(false) + , mFilterByPublisher(false) , mFilterByRatings(false) , mFilterByKidGame(false) , mFilterByCompleted(false) @@ -42,7 +43,8 @@ FileFilterIndex::FileFilterIndex() {FAVORITES_FILTER, &mFavoritesIndexAllKeys, &mFilterByFavorites, &mFavoritesIndexFilteredKeys, "favorite", false, "", "FAVORITES"}, {GENRE_FILTER, &mGenreIndexAllKeys, &mFilterByGenre, &mGenreIndexFilteredKeys, "genre", true, "genre", "GENRE"}, {PLAYER_FILTER, &mPlayersIndexAllKeys, &mFilterByPlayers, &mPlayersIndexFilteredKeys, "players", false, "", "PLAYERS"}, - {PUBDEV_FILTER, &mPubDevIndexAllKeys, &mFilterByPubDev, &mPubDevIndexFilteredKeys, "developer", true, "publisher", "PUBLISHER / DEVELOPER"}, + {DEVELOPER_FILTER, &mDeveloperIndexAllKeys, &mFilterByDeveloper, &mDeveloperIndexFilteredKeys, "developer", false, "", "DEVELOPER"}, + {PUBLISHER_FILTER, &mPublisherIndexAllKeys, &mFilterByPublisher, &mPublisherIndexFilteredKeys, "publisher", false, "", "PUBLISHER"}, {RATINGS_FILTER, &mRatingsIndexAllKeys, &mFilterByRatings, &mRatingsIndexFilteredKeys, "rating", false, "", "RATING"}, {KIDGAME_FILTER, &mKidGameIndexAllKeys, &mFilterByKidGame, &mKidGameIndexFilteredKeys, "kidgame", false, "", "KIDGAME"}, {COMPLETED_FILTER, &mCompletedIndexAllKeys, &mFilterByCompleted, &mCompletedIndexFilteredKeys, "completed", false, "", "COMPLETED"}, @@ -73,7 +75,8 @@ void FileFilterIndex::importIndex(FileFilterIndex* indexToImport) {&mFavoritesIndexAllKeys, &(indexToImport->mFavoritesIndexAllKeys)}, {&mGenreIndexAllKeys, &(indexToImport->mGenreIndexAllKeys)}, {&mPlayersIndexAllKeys, &(indexToImport->mPlayersIndexAllKeys)}, - {&mPubDevIndexAllKeys, &(indexToImport->mPubDevIndexAllKeys)}, + {&mDeveloperIndexAllKeys, &(indexToImport->mDeveloperIndexAllKeys)}, + {&mPublisherIndexAllKeys, &(indexToImport->mPublisherIndexAllKeys)}, {&mRatingsIndexAllKeys, &(indexToImport->mRatingsIndexAllKeys)}, {&mKidGameIndexAllKeys, &(indexToImport->mKidGameIndexAllKeys)}, {&mCompletedIndexAllKeys, &(indexToImport->mCompletedIndexAllKeys)}, @@ -109,7 +112,8 @@ void FileFilterIndex::resetIndex() clearIndex(mFavoritesIndexAllKeys); clearIndex(mGenreIndexAllKeys); clearIndex(mPlayersIndexAllKeys); - clearIndex(mPubDevIndexAllKeys); + clearIndex(mDeveloperIndexAllKeys); + clearIndex(mPublisherIndexAllKeys); clearIndex(mRatingsIndexAllKeys); clearIndex(mKidGameIndexAllKeys); clearIndex(mCompletedIndexAllKeys); @@ -132,7 +136,6 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, } case GENRE_FILTER: { key = Utils::String::toUpper(game->metadata.get("genre")); - key = Utils::String::trim(key); if (getSecondary && !key.empty()) { std::istringstream f(key); std::string newKey; @@ -150,13 +153,12 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, key = Utils::String::toUpper(game->metadata.get("players")); break; } - case PUBDEV_FILTER: { + case DEVELOPER_FILTER: { + key = Utils::String::toUpper(game->metadata.get("developer")); + break; + } + case PUBLISHER_FILTER: { key = Utils::String::toUpper(game->metadata.get("publisher")); - key = Utils::String::trim(key); - if ((getSecondary && !key.empty()) || (!getSecondary && key.empty())) - key = Utils::String::toUpper(game->metadata.get("developer")); - else - key = Utils::String::toUpper(game->metadata.get("publisher")); break; } case RATINGS_FILTER: { @@ -225,7 +227,8 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, key = Utils::String::trim(key); // Add a dummy value in case there is no metadata defined so we can filter based on this. - if ((type == GENRE_FILTER || type == PLAYER_FILTER || type == PUBDEV_FILTER) && + if ((type == GENRE_FILTER || type == PLAYER_FILTER || type == DEVELOPER_FILTER || + type == PUBLISHER_FILTER) && Utils::String::toUpper(key) == UNKNOWN_LABEL) key = ViewController::CROSSEDCIRCLE_CHAR + " UNKNOWN"; else if (type == ALTEMULATOR_FILTER && key.empty()) @@ -241,7 +244,8 @@ void FileFilterIndex::addToIndex(FileData* game) manageFavoritesEntryInIndex(game); manageGenreEntryInIndex(game); managePlayerEntryInIndex(game); - managePubDevEntryInIndex(game); + manageDeveloperEntryInIndex(game); + managePublisherEntryInIndex(game); manageRatingsEntryInIndex(game); manageKidGameEntryInIndex(game); manageCompletedEntryInIndex(game); @@ -255,7 +259,8 @@ void FileFilterIndex::removeFromIndex(FileData* game) manageFavoritesEntryInIndex(game, true); manageGenreEntryInIndex(game, true); managePlayerEntryInIndex(game, true); - managePubDevEntryInIndex(game, true); + manageDeveloperEntryInIndex(game, true); + managePublisherEntryInIndex(game, true); manageRatingsEntryInIndex(game, true); manageKidGameEntryInIndex(game, true); manageCompletedEntryInIndex(game, true); @@ -339,7 +344,10 @@ void FileFilterIndex::debugPrintIndexes() for (auto x : mPlayersIndexAllKeys) { LOG(LogInfo) << "Multiplayer Index: " << x.first << ": " << x.second; } - for (auto x : mPubDevIndexAllKeys) { + for (auto x : mDeveloperIndexAllKeys) { + LOG(LogInfo) << "PubDev Index: " << x.first << ": " << x.second; + } + for (auto x : mPublisherIndexAllKeys) { LOG(LogInfo) << "PubDev Index: " << x.first << ": " << x.second; } for (auto x : mRatingsIndexAllKeys) { @@ -435,28 +443,29 @@ bool FileFilterIndex::isFiltered() { if (UIModeController::getInstance()->isUIModeKid()) { return (mFilterByText || mFilterByFavorites || mFilterByGenre || mFilterByPlayers || - mFilterByPubDev || mFilterByRatings || mFilterByCompleted || mFilterByBroken || - mFilterByHidden || mFilterByAltemulator); + mFilterByDeveloper || mFilterByPublisher || mFilterByRatings || + mFilterByCompleted || mFilterByBroken || mFilterByHidden || mFilterByAltemulator); } else { return (mFilterByText || mFilterByFavorites || mFilterByGenre || mFilterByPlayers || - mFilterByPubDev || mFilterByRatings || mFilterByKidGame || mFilterByCompleted || - mFilterByBroken || mFilterByHidden | mFilterByAltemulator); + mFilterByDeveloper || mFilterByPublisher || mFilterByRatings || mFilterByKidGame || + mFilterByCompleted || mFilterByBroken || mFilterByHidden | mFilterByAltemulator); } } bool FileFilterIndex::isKeyBeingFilteredBy(std::string key, FilterIndexType type) { - const FilterIndexType filterTypes[10] = { - FAVORITES_FILTER, GENRE_FILTER, PLAYER_FILTER, PUBDEV_FILTER, RATINGS_FILTER, - KIDGAME_FILTER, COMPLETED_FILTER, BROKEN_FILTER, HIDDEN_FILTER, ALTEMULATOR_FILTER}; - std::vector filterKeysList[10] = { - mFavoritesIndexFilteredKeys, mGenreIndexFilteredKeys, mPlayersIndexFilteredKeys, - mPubDevIndexFilteredKeys, mRatingsIndexFilteredKeys, mKidGameIndexFilteredKeys, - mCompletedIndexFilteredKeys, mBrokenIndexFilteredKeys, mHiddenIndexFilteredKeys, - mAltemulatorIndexFilteredKeys}; + const FilterIndexType filterTypes[11] = {FAVORITES_FILTER, GENRE_FILTER, PLAYER_FILTER, + DEVELOPER_FILTER, PUBLISHER_FILTER, RATINGS_FILTER, + KIDGAME_FILTER, COMPLETED_FILTER, BROKEN_FILTER, + HIDDEN_FILTER, ALTEMULATOR_FILTER}; + std::vector filterKeysList[11] = { + mFavoritesIndexFilteredKeys, mGenreIndexFilteredKeys, mPlayersIndexFilteredKeys, + mDeveloperIndexFilteredKeys, mPublisherIndexFilteredKeys, mRatingsIndexFilteredKeys, + mKidGameIndexFilteredKeys, mCompletedIndexFilteredKeys, mBrokenIndexFilteredKeys, + mHiddenIndexFilteredKeys, mAltemulatorIndexFilteredKeys}; - for (int i = 0; i < 10; i++) { + for (int i = 0; i < 11; i++) { if (filterTypes[i] == type) { for (std::vector::const_iterator it = filterKeysList[i].cbegin(); it != filterKeysList[i].cend(); it++) { @@ -471,12 +480,10 @@ bool FileFilterIndex::isKeyBeingFilteredBy(std::string key, FilterIndexType type void FileFilterIndex::manageFavoritesEntryInIndex(FileData* game, bool remove) { - // Flag for including unknowns. bool includeUnknown = INCLUDE_UNKNOWN; std::string key = getIndexableKey(game, FAVORITES_FILTER, false); if (!includeUnknown && key == UNKNOWN_LABEL) - // No valid favorites info found. return; manageIndexEntry(&mFavoritesIndexAllKeys, key, remove); @@ -484,13 +491,10 @@ void FileFilterIndex::manageFavoritesEntryInIndex(FileData* game, bool remove) void FileFilterIndex::manageGenreEntryInIndex(FileData* game, bool remove) { + bool includeUnknown = INCLUDE_UNKNOWN; std::string key = getIndexableKey(game, GENRE_FILTER, false); - // Flag for including unknowns. - bool includeUnknown = INCLUDE_UNKNOWN; - if (!includeUnknown && (key == UNKNOWN_LABEL || key == "BIOS")) - // No valid genre info found. return; manageIndexEntry(&mGenreIndexAllKeys, key, remove); @@ -502,51 +506,43 @@ void FileFilterIndex::manageGenreEntryInIndex(FileData* game, bool remove) void FileFilterIndex::managePlayerEntryInIndex(FileData* game, bool remove) { - // Flag for including unknowns. bool includeUnknown = INCLUDE_UNKNOWN; std::string key = getIndexableKey(game, PLAYER_FILTER, false); if (!includeUnknown && key == UNKNOWN_LABEL) - // No valid player info found. return; manageIndexEntry(&mPlayersIndexAllKeys, key, remove); } -void FileFilterIndex::managePubDevEntryInIndex(FileData* game, bool remove) +void FileFilterIndex::manageDeveloperEntryInIndex(FileData* game, bool remove) { - std::string pub = getIndexableKey(game, PUBDEV_FILTER, false); - std::string dev = getIndexableKey(game, PUBDEV_FILTER, true); - - // Flag for including unknowns. bool includeUnknown = INCLUDE_UNKNOWN; - bool unknownPub = false; - bool unknownDev = false; + std::string key = getIndexableKey(game, DEVELOPER_FILTER, false); - if (pub == UNKNOWN_LABEL) - unknownPub = true; - - if (dev == UNKNOWN_LABEL) - unknownDev = true; - - if (!includeUnknown && unknownDev && unknownPub) - // No valid rating info found. + if (!includeUnknown && key == UNKNOWN_LABEL) return; - if (unknownDev && unknownPub) { - // If no info at all. - manageIndexEntry(&mPubDevIndexAllKeys, pub, remove); - } - else { - if (!unknownDev) { - // If no info at all. - manageIndexEntry(&mPubDevIndexAllKeys, dev, remove); - } - if (!unknownPub) { - // If no info at all. - manageIndexEntry(&mPubDevIndexAllKeys, pub, remove); - } - } + manageIndexEntry(&mDeveloperIndexAllKeys, key, remove); + + key = getIndexableKey(game, DEVELOPER_FILTER, true); + if (!includeUnknown && key == UNKNOWN_LABEL) + manageIndexEntry(&mDeveloperIndexAllKeys, key, remove); +} + +void FileFilterIndex::managePublisherEntryInIndex(FileData* game, bool remove) +{ + bool includeUnknown = INCLUDE_UNKNOWN; + std::string key = getIndexableKey(game, PUBLISHER_FILTER, false); + + if (!includeUnknown && key == UNKNOWN_LABEL) + return; + + manageIndexEntry(&mPublisherIndexAllKeys, key, remove); + + key = getIndexableKey(game, PUBLISHER_FILTER, true); + if (!includeUnknown && key == UNKNOWN_LABEL) + manageIndexEntry(&mPublisherIndexAllKeys, key, remove); } void FileFilterIndex::manageRatingsEntryInIndex(FileData* game, bool remove) diff --git a/es-app/src/FileFilterIndex.h b/es-app/src/FileFilterIndex.h index cd2576f39..b06ca7d79 100644 --- a/es-app/src/FileFilterIndex.h +++ b/es-app/src/FileFilterIndex.h @@ -24,7 +24,8 @@ enum FilterIndexType { FAVORITES_FILTER, GENRE_FILTER, PLAYER_FILTER, - PUBDEV_FILTER, + DEVELOPER_FILTER, + PUBLISHER_FILTER, RATINGS_FILTER, KIDGAME_FILTER, COMPLETED_FILTER, @@ -74,7 +75,8 @@ private: void manageFavoritesEntryInIndex(FileData* game, bool remove = false); void manageGenreEntryInIndex(FileData* game, bool remove = false); void managePlayerEntryInIndex(FileData* game, bool remove = false); - void managePubDevEntryInIndex(FileData* game, bool remove = false); + void manageDeveloperEntryInIndex(FileData* game, bool remove = false); + void managePublisherEntryInIndex(FileData* game, bool remove = false); void manageRatingsEntryInIndex(FileData* game, bool remove = false); void manageKidGameEntryInIndex(FileData* game, bool remove = false); void manageCompletedEntryInIndex(FileData* game, bool remove = false); @@ -93,7 +95,8 @@ private: bool mFilterByFavorites; bool mFilterByGenre; bool mFilterByPlayers; - bool mFilterByPubDev; + bool mFilterByDeveloper; + bool mFilterByPublisher; bool mFilterByRatings; bool mFilterByKidGame; bool mFilterByCompleted; @@ -104,7 +107,8 @@ private: std::map mFavoritesIndexAllKeys; std::map mGenreIndexAllKeys; std::map mPlayersIndexAllKeys; - std::map mPubDevIndexAllKeys; + std::map mDeveloperIndexAllKeys; + std::map mPublisherIndexAllKeys; std::map mRatingsIndexAllKeys; std::map mKidGameIndexAllKeys; std::map mCompletedIndexAllKeys; @@ -115,7 +119,8 @@ private: std::vector mFavoritesIndexFilteredKeys; std::vector mGenreIndexFilteredKeys; std::vector mPlayersIndexFilteredKeys; - std::vector mPubDevIndexFilteredKeys; + std::vector mDeveloperIndexFilteredKeys; + std::vector mPublisherIndexFilteredKeys; std::vector mRatingsIndexFilteredKeys; std::vector mKidGameIndexFilteredKeys; std::vector mCompletedIndexFilteredKeys; From e93084864588dc1c80ae6ef943653f18c8a5940a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 25 Sep 2021 20:15:13 +0200 Subject: [PATCH 09/21] Sorted the filters in the same order as the metadata editor fields. --- es-app/src/FileFilterIndex.cpp | 296 ++++++++++++++++----------------- es-app/src/FileFilterIndex.h | 60 +++---- 2 files changed, 178 insertions(+), 178 deletions(-) diff --git a/es-app/src/FileFilterIndex.cpp b/es-app/src/FileFilterIndex.cpp index e3d315de9..20063dea8 100644 --- a/es-app/src/FileFilterIndex.cpp +++ b/es-app/src/FileFilterIndex.cpp @@ -23,16 +23,16 @@ FileFilterIndex::FileFilterIndex() : mFilterByText(false) , mTextRemoveSystem(false) - , mFilterByFavorites(false) - , mFilterByGenre(false) - , mFilterByPlayers(false) + , mFilterByRatings(false) , mFilterByDeveloper(false) , mFilterByPublisher(false) - , mFilterByRatings(false) - , mFilterByKidGame(false) + , mFilterByGenre(false) + , mFilterByPlayers(false) + , mFilterByFavorites(false) , mFilterByCompleted(false) - , mFilterByBroken(false) + , mFilterByKidGame(false) , mFilterByHidden(false) + , mFilterByBroken(false) , mFilterByAltemulator(false) { clearAllFilters(); @@ -40,16 +40,16 @@ FileFilterIndex::FileFilterIndex() // clang-format off FilterDataDecl filterDecls[] = { //type //allKeys //filteredBy //filteredKeys //primaryKey //hasSecondaryKey //secondaryKey //menuLabel - {FAVORITES_FILTER, &mFavoritesIndexAllKeys, &mFilterByFavorites, &mFavoritesIndexFilteredKeys, "favorite", false, "", "FAVORITES"}, - {GENRE_FILTER, &mGenreIndexAllKeys, &mFilterByGenre, &mGenreIndexFilteredKeys, "genre", true, "genre", "GENRE"}, - {PLAYER_FILTER, &mPlayersIndexAllKeys, &mFilterByPlayers, &mPlayersIndexFilteredKeys, "players", false, "", "PLAYERS"}, + {RATINGS_FILTER, &mRatingsIndexAllKeys, &mFilterByRatings, &mRatingsIndexFilteredKeys, "rating", false, "", "RATING"}, {DEVELOPER_FILTER, &mDeveloperIndexAllKeys, &mFilterByDeveloper, &mDeveloperIndexFilteredKeys, "developer", false, "", "DEVELOPER"}, {PUBLISHER_FILTER, &mPublisherIndexAllKeys, &mFilterByPublisher, &mPublisherIndexFilteredKeys, "publisher", false, "", "PUBLISHER"}, - {RATINGS_FILTER, &mRatingsIndexAllKeys, &mFilterByRatings, &mRatingsIndexFilteredKeys, "rating", false, "", "RATING"}, - {KIDGAME_FILTER, &mKidGameIndexAllKeys, &mFilterByKidGame, &mKidGameIndexFilteredKeys, "kidgame", false, "", "KIDGAME"}, + {GENRE_FILTER, &mGenreIndexAllKeys, &mFilterByGenre, &mGenreIndexFilteredKeys, "genre", true, "genre", "GENRE"}, + {PLAYER_FILTER, &mPlayersIndexAllKeys, &mFilterByPlayers, &mPlayersIndexFilteredKeys, "players", false, "", "PLAYERS"}, + {FAVORITES_FILTER, &mFavoritesIndexAllKeys, &mFilterByFavorites, &mFavoritesIndexFilteredKeys, "favorite", false, "", "FAVORITE"}, {COMPLETED_FILTER, &mCompletedIndexAllKeys, &mFilterByCompleted, &mCompletedIndexFilteredKeys, "completed", false, "", "COMPLETED"}, - {BROKEN_FILTER, &mBrokenIndexAllKeys, &mFilterByBroken, &mBrokenIndexFilteredKeys, "broken", false, "", "BROKEN"}, + {KIDGAME_FILTER, &mKidGameIndexAllKeys, &mFilterByKidGame, &mKidGameIndexFilteredKeys, "kidgame", false, "", "KIDGAME"}, {HIDDEN_FILTER, &mHiddenIndexAllKeys, &mFilterByHidden, &mHiddenIndexFilteredKeys, "hidden", false, "", "HIDDEN"}, + {BROKEN_FILTER, &mBrokenIndexAllKeys, &mFilterByBroken, &mBrokenIndexFilteredKeys, "broken", false, "", "BROKEN"}, {ALTEMULATOR_FILTER, &mAltemulatorIndexAllKeys, &mFilterByAltemulator, &mAltemulatorIndexFilteredKeys, "altemulator", false, "", "ALTERNATIVE EMULATOR"} }; // clang-format on @@ -72,16 +72,16 @@ void FileFilterIndex::importIndex(FileFilterIndex* indexToImport) }; IndexImportStructure indexStructDecls[] = { - {&mFavoritesIndexAllKeys, &(indexToImport->mFavoritesIndexAllKeys)}, - {&mGenreIndexAllKeys, &(indexToImport->mGenreIndexAllKeys)}, - {&mPlayersIndexAllKeys, &(indexToImport->mPlayersIndexAllKeys)}, + {&mRatingsIndexAllKeys, &(indexToImport->mRatingsIndexAllKeys)}, {&mDeveloperIndexAllKeys, &(indexToImport->mDeveloperIndexAllKeys)}, {&mPublisherIndexAllKeys, &(indexToImport->mPublisherIndexAllKeys)}, - {&mRatingsIndexAllKeys, &(indexToImport->mRatingsIndexAllKeys)}, - {&mKidGameIndexAllKeys, &(indexToImport->mKidGameIndexAllKeys)}, + {&mGenreIndexAllKeys, &(indexToImport->mGenreIndexAllKeys)}, + {&mPlayersIndexAllKeys, &(indexToImport->mPlayersIndexAllKeys)}, + {&mFavoritesIndexAllKeys, &(indexToImport->mFavoritesIndexAllKeys)}, {&mCompletedIndexAllKeys, &(indexToImport->mCompletedIndexAllKeys)}, - {&mBrokenIndexAllKeys, &(indexToImport->mBrokenIndexAllKeys)}, + {&mKidGameIndexAllKeys, &(indexToImport->mKidGameIndexAllKeys)}, {&mHiddenIndexAllKeys, &(indexToImport->mHiddenIndexAllKeys)}, + {&mBrokenIndexAllKeys, &(indexToImport->mBrokenIndexAllKeys)}, {&mAltemulatorIndexAllKeys, &(indexToImport->mAltemulatorIndexAllKeys)}, }; @@ -109,16 +109,16 @@ void FileFilterIndex::importIndex(FileFilterIndex* indexToImport) void FileFilterIndex::resetIndex() { clearAllFilters(); - clearIndex(mFavoritesIndexAllKeys); - clearIndex(mGenreIndexAllKeys); - clearIndex(mPlayersIndexAllKeys); + clearIndex(mRatingsIndexAllKeys); clearIndex(mDeveloperIndexAllKeys); clearIndex(mPublisherIndexAllKeys); - clearIndex(mRatingsIndexAllKeys); - clearIndex(mKidGameIndexAllKeys); + clearIndex(mGenreIndexAllKeys); + clearIndex(mPlayersIndexAllKeys); + clearIndex(mFavoritesIndexAllKeys); clearIndex(mCompletedIndexAllKeys); - clearIndex(mBrokenIndexAllKeys); + clearIndex(mKidGameIndexAllKeys); clearIndex(mHiddenIndexAllKeys); + clearIndex(mBrokenIndexAllKeys); clearIndex(mAltemulatorIndexAllKeys); } @@ -128,39 +128,6 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, { std::string key = ""; switch (type) { - case FAVORITES_FILTER: { - if (game->getType() != GAME) - return "FALSE"; - key = Utils::String::toUpper(game->metadata.get("favorite")); - break; - } - case GENRE_FILTER: { - key = Utils::String::toUpper(game->metadata.get("genre")); - if (getSecondary && !key.empty()) { - std::istringstream f(key); - std::string newKey; - getline(f, newKey, '/'); - if (!newKey.empty() && newKey != key) - key = newKey; - else - key = std::string(); - } - break; - } - case PLAYER_FILTER: { - if (getSecondary) - break; - key = Utils::String::toUpper(game->metadata.get("players")); - break; - } - case DEVELOPER_FILTER: { - key = Utils::String::toUpper(game->metadata.get("developer")); - break; - } - case PUBLISHER_FILTER: { - key = Utils::String::toUpper(game->metadata.get("publisher")); - break; - } case RATINGS_FILTER: { int ratingNumber = 0; if (!getSecondary) { @@ -191,10 +158,37 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, } break; } - case KIDGAME_FILTER: { + case DEVELOPER_FILTER: { + key = Utils::String::toUpper(game->metadata.get("developer")); + break; + } + case PUBLISHER_FILTER: { + key = Utils::String::toUpper(game->metadata.get("publisher")); + break; + } + case GENRE_FILTER: { + key = Utils::String::toUpper(game->metadata.get("genre")); + if (getSecondary && !key.empty()) { + std::istringstream f(key); + std::string newKey; + getline(f, newKey, '/'); + if (!newKey.empty() && newKey != key) + key = newKey; + else + key = std::string(); + } + break; + } + case PLAYER_FILTER: { + if (getSecondary) + break; + key = Utils::String::toUpper(game->metadata.get("players")); + break; + } + case FAVORITES_FILTER: { if (game->getType() != GAME) return "FALSE"; - key = Utils::String::toUpper(game->metadata.get("kidgame")); + key = Utils::String::toUpper(game->metadata.get("favorite")); break; } case COMPLETED_FILTER: { @@ -203,10 +197,10 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, key = Utils::String::toUpper(game->metadata.get("completed")); break; } - case BROKEN_FILTER: { + case KIDGAME_FILTER: { if (game->getType() != GAME) return "FALSE"; - key = Utils::String::toUpper(game->metadata.get("broken")); + key = Utils::String::toUpper(game->metadata.get("kidgame")); break; } case HIDDEN_FILTER: { @@ -215,6 +209,12 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, key = Utils::String::toUpper(game->metadata.get("hidden")); break; } + case BROKEN_FILTER: { + if (game->getType() != GAME) + return "FALSE"; + key = Utils::String::toUpper(game->metadata.get("broken")); + break; + } case ALTEMULATOR_FILTER: { if (getSecondary) break; @@ -241,31 +241,31 @@ std::string FileFilterIndex::getIndexableKey(FileData* game, void FileFilterIndex::addToIndex(FileData* game) { - manageFavoritesEntryInIndex(game); - manageGenreEntryInIndex(game); - managePlayerEntryInIndex(game); + manageRatingsEntryInIndex(game); manageDeveloperEntryInIndex(game); managePublisherEntryInIndex(game); - manageRatingsEntryInIndex(game); - manageKidGameEntryInIndex(game); + manageGenreEntryInIndex(game); + managePlayerEntryInIndex(game); + manageFavoritesEntryInIndex(game); manageCompletedEntryInIndex(game); - manageBrokenEntryInIndex(game); + manageKidGameEntryInIndex(game); manageHiddenEntryInIndex(game); + manageBrokenEntryInIndex(game); manageAltemulatorEntryInIndex(game); } void FileFilterIndex::removeFromIndex(FileData* game) { - manageFavoritesEntryInIndex(game, true); - manageGenreEntryInIndex(game, true); - managePlayerEntryInIndex(game, true); + manageRatingsEntryInIndex(game, true); manageDeveloperEntryInIndex(game, true); managePublisherEntryInIndex(game, true); - manageRatingsEntryInIndex(game, true); - manageKidGameEntryInIndex(game, true); + manageGenreEntryInIndex(game, true); + managePlayerEntryInIndex(game, true); + manageFavoritesEntryInIndex(game, true); manageCompletedEntryInIndex(game, true); - manageBrokenEntryInIndex(game, true); + manageKidGameEntryInIndex(game, true); manageHiddenEntryInIndex(game, true); + manageBrokenEntryInIndex(game, true); manageAltemulatorEntryInIndex(game, true); } @@ -335,36 +335,36 @@ void FileFilterIndex::setKidModeFilters() void FileFilterIndex::debugPrintIndexes() { LOG(LogInfo) << "Printing Indexes..."; - for (auto x : mFavoritesIndexAllKeys) { - LOG(LogInfo) << "Favorites Index: " << x.first << ": " << x.second; + for (auto x : mRatingsIndexAllKeys) { + LOG(LogInfo) << "Ratings Index: " << x.first << ": " << x.second; + } + for (auto x : mDeveloperIndexAllKeys) { + LOG(LogInfo) << "Developer Index: " << x.first << ": " << x.second; + } + for (auto x : mPublisherIndexAllKeys) { + LOG(LogInfo) << "Publisher Index: " << x.first << ": " << x.second; } for (auto x : mGenreIndexAllKeys) { LOG(LogInfo) << "Genre Index: " << x.first << ": " << x.second; } for (auto x : mPlayersIndexAllKeys) { - LOG(LogInfo) << "Multiplayer Index: " << x.first << ": " << x.second; + LOG(LogInfo) << "Players Index: " << x.first << ": " << x.second; } - for (auto x : mDeveloperIndexAllKeys) { - LOG(LogInfo) << "PubDev Index: " << x.first << ": " << x.second; - } - for (auto x : mPublisherIndexAllKeys) { - LOG(LogInfo) << "PubDev Index: " << x.first << ": " << x.second; - } - for (auto x : mRatingsIndexAllKeys) { - LOG(LogInfo) << "Ratings Index: " << x.first << ": " << x.second; - } - for (auto x : mKidGameIndexAllKeys) { - LOG(LogInfo) << "KidGames Index: " << x.first << ": " << x.second; + for (auto x : mFavoritesIndexAllKeys) { + LOG(LogInfo) << "Favorites Index: " << x.first << ": " << x.second; } for (auto x : mCompletedIndexAllKeys) { LOG(LogInfo) << "Completed Index: " << x.first << ": " << x.second; } - for (auto x : mBrokenIndexAllKeys) { - LOG(LogInfo) << "Broken Index: " << x.first << ": " << x.second; + for (auto x : mKidGameIndexAllKeys) { + LOG(LogInfo) << "KidGames Index: " << x.first << ": " << x.second; } for (auto x : mHiddenIndexAllKeys) { LOG(LogInfo) << "Hidden Index: " << x.first << ": " << x.second; } + for (auto x : mBrokenIndexAllKeys) { + LOG(LogInfo) << "Broken Index: " << x.first << ": " << x.second; + } for (auto x : mAltemulatorIndexAllKeys) { LOG(LogInfo) << "Altemulator Index: " << x.first << ": " << x.second; } @@ -442,28 +442,28 @@ bool FileFilterIndex::showFile(FileData* game) bool FileFilterIndex::isFiltered() { if (UIModeController::getInstance()->isUIModeKid()) { - return (mFilterByText || mFilterByFavorites || mFilterByGenre || mFilterByPlayers || - mFilterByDeveloper || mFilterByPublisher || mFilterByRatings || - mFilterByCompleted || mFilterByBroken || mFilterByHidden || mFilterByAltemulator); + return (mFilterByText || mFilterByRatings || mFilterByDeveloper || mFilterByPublisher || + mFilterByGenre || mFilterByPlayers || mFilterByFavorites || mFilterByCompleted || + mFilterByHidden || mFilterByBroken || mFilterByAltemulator); } else { - return (mFilterByText || mFilterByFavorites || mFilterByGenre || mFilterByPlayers || - mFilterByDeveloper || mFilterByPublisher || mFilterByRatings || mFilterByKidGame || - mFilterByCompleted || mFilterByBroken || mFilterByHidden | mFilterByAltemulator); + return (mFilterByText || mFilterByRatings || mFilterByDeveloper || mFilterByPublisher || + mFilterByGenre || mFilterByPlayers || mFilterByFavorites || mFilterByCompleted || + mFilterByKidGame || mFilterByHidden || mFilterByBroken || mFilterByAltemulator); } } bool FileFilterIndex::isKeyBeingFilteredBy(std::string key, FilterIndexType type) { - const FilterIndexType filterTypes[11] = {FAVORITES_FILTER, GENRE_FILTER, PLAYER_FILTER, - DEVELOPER_FILTER, PUBLISHER_FILTER, RATINGS_FILTER, - KIDGAME_FILTER, COMPLETED_FILTER, BROKEN_FILTER, - HIDDEN_FILTER, ALTEMULATOR_FILTER}; + const FilterIndexType filterTypes[11] = {RATINGS_FILTER, DEVELOPER_FILTER, PUBLISHER_FILTER, + GENRE_FILTER, PLAYER_FILTER, FAVORITES_FILTER, + COMPLETED_FILTER, KIDGAME_FILTER, HIDDEN_FILTER, + BROKEN_FILTER, ALTEMULATOR_FILTER}; std::vector filterKeysList[11] = { - mFavoritesIndexFilteredKeys, mGenreIndexFilteredKeys, mPlayersIndexFilteredKeys, - mDeveloperIndexFilteredKeys, mPublisherIndexFilteredKeys, mRatingsIndexFilteredKeys, - mKidGameIndexFilteredKeys, mCompletedIndexFilteredKeys, mBrokenIndexFilteredKeys, - mHiddenIndexFilteredKeys, mAltemulatorIndexFilteredKeys}; + mRatingsIndexFilteredKeys, mDeveloperIndexFilteredKeys, mPublisherIndexFilteredKeys, + mGenreIndexFilteredKeys, mPlayersIndexFilteredKeys, mFavoritesIndexFilteredKeys, + mCompletedIndexFilteredKeys, mKidGameIndexFilteredKeys, mHiddenIndexFilteredKeys, + mBrokenIndexFilteredKeys, mAltemulatorIndexFilteredKeys}; for (int i = 0; i < 11; i++) { if (filterTypes[i] == type) { @@ -478,41 +478,18 @@ bool FileFilterIndex::isKeyBeingFilteredBy(std::string key, FilterIndexType type return false; } -void FileFilterIndex::manageFavoritesEntryInIndex(FileData* game, bool remove) +void FileFilterIndex::manageRatingsEntryInIndex(FileData* game, bool remove) { + std::string key = getIndexableKey(game, RATINGS_FILTER, false); + + // Flag for including unknowns. bool includeUnknown = INCLUDE_UNKNOWN; - std::string key = getIndexableKey(game, FAVORITES_FILTER, false); if (!includeUnknown && key == UNKNOWN_LABEL) + // No valid rating info found. return; - manageIndexEntry(&mFavoritesIndexAllKeys, key, remove); -} - -void FileFilterIndex::manageGenreEntryInIndex(FileData* game, bool remove) -{ - bool includeUnknown = INCLUDE_UNKNOWN; - std::string key = getIndexableKey(game, GENRE_FILTER, false); - - if (!includeUnknown && (key == UNKNOWN_LABEL || key == "BIOS")) - return; - - manageIndexEntry(&mGenreIndexAllKeys, key, remove); - - key = getIndexableKey(game, GENRE_FILTER, true); - if (!includeUnknown && key == UNKNOWN_LABEL) - manageIndexEntry(&mGenreIndexAllKeys, key, remove); -} - -void FileFilterIndex::managePlayerEntryInIndex(FileData* game, bool remove) -{ - bool includeUnknown = INCLUDE_UNKNOWN; - std::string key = getIndexableKey(game, PLAYER_FILTER, false); - - if (!includeUnknown && key == UNKNOWN_LABEL) - return; - - manageIndexEntry(&mPlayersIndexAllKeys, key, remove); + manageIndexEntry(&mRatingsIndexAllKeys, key, remove); } void FileFilterIndex::manageDeveloperEntryInIndex(FileData* game, bool remove) @@ -545,31 +522,41 @@ void FileFilterIndex::managePublisherEntryInIndex(FileData* game, bool remove) manageIndexEntry(&mPublisherIndexAllKeys, key, remove); } -void FileFilterIndex::manageRatingsEntryInIndex(FileData* game, bool remove) +void FileFilterIndex::manageGenreEntryInIndex(FileData* game, bool remove) { - std::string key = getIndexableKey(game, RATINGS_FILTER, false); - - // Flag for including unknowns. bool includeUnknown = INCLUDE_UNKNOWN; + std::string key = getIndexableKey(game, GENRE_FILTER, false); - if (!includeUnknown && key == UNKNOWN_LABEL) - // No valid rating info found. + if (!includeUnknown && (key == UNKNOWN_LABEL || key == "BIOS")) return; - manageIndexEntry(&mRatingsIndexAllKeys, key, remove); + manageIndexEntry(&mGenreIndexAllKeys, key, remove); + + key = getIndexableKey(game, GENRE_FILTER, true); + if (!includeUnknown && key == UNKNOWN_LABEL) + manageIndexEntry(&mGenreIndexAllKeys, key, remove); } -void FileFilterIndex::manageKidGameEntryInIndex(FileData* game, bool remove) +void FileFilterIndex::managePlayerEntryInIndex(FileData* game, bool remove) { - // Flag for including unknowns. bool includeUnknown = INCLUDE_UNKNOWN; - std::string key = getIndexableKey(game, KIDGAME_FILTER, false); + std::string key = getIndexableKey(game, PLAYER_FILTER, false); if (!includeUnknown && key == UNKNOWN_LABEL) - // No valid kidgame info found. return; - manageIndexEntry(&mKidGameIndexAllKeys, key, remove); + manageIndexEntry(&mPlayersIndexAllKeys, key, remove); +} + +void FileFilterIndex::manageFavoritesEntryInIndex(FileData* game, bool remove) +{ + bool includeUnknown = INCLUDE_UNKNOWN; + std::string key = getIndexableKey(game, FAVORITES_FILTER, false); + + if (!includeUnknown && key == UNKNOWN_LABEL) + return; + + manageIndexEntry(&mFavoritesIndexAllKeys, key, remove); } void FileFilterIndex::manageCompletedEntryInIndex(FileData* game, bool remove) @@ -585,17 +572,17 @@ void FileFilterIndex::manageCompletedEntryInIndex(FileData* game, bool remove) manageIndexEntry(&mCompletedIndexAllKeys, key, remove); } -void FileFilterIndex::manageBrokenEntryInIndex(FileData* game, bool remove) +void FileFilterIndex::manageKidGameEntryInIndex(FileData* game, bool remove) { // Flag for including unknowns. bool includeUnknown = INCLUDE_UNKNOWN; - std::string key = getIndexableKey(game, BROKEN_FILTER, false); + std::string key = getIndexableKey(game, KIDGAME_FILTER, false); if (!includeUnknown && key == UNKNOWN_LABEL) - // No valid broken info found. + // No valid kidgame info found. return; - manageIndexEntry(&mBrokenIndexAllKeys, key, remove); + manageIndexEntry(&mKidGameIndexAllKeys, key, remove); } void FileFilterIndex::manageHiddenEntryInIndex(FileData* game, bool remove) @@ -611,6 +598,19 @@ void FileFilterIndex::manageHiddenEntryInIndex(FileData* game, bool remove) manageIndexEntry(&mHiddenIndexAllKeys, key, remove); } +void FileFilterIndex::manageBrokenEntryInIndex(FileData* game, bool remove) +{ + // Flag for including unknowns. + bool includeUnknown = INCLUDE_UNKNOWN; + std::string key = getIndexableKey(game, BROKEN_FILTER, false); + + if (!includeUnknown && key == UNKNOWN_LABEL) + // No valid broken info found. + return; + + manageIndexEntry(&mBrokenIndexAllKeys, key, remove); +} + void FileFilterIndex::manageAltemulatorEntryInIndex(FileData* game, bool remove) { std::string key = getIndexableKey(game, ALTEMULATOR_FILTER, false); diff --git a/es-app/src/FileFilterIndex.h b/es-app/src/FileFilterIndex.h index b06ca7d79..d4d744a7f 100644 --- a/es-app/src/FileFilterIndex.h +++ b/es-app/src/FileFilterIndex.h @@ -21,16 +21,16 @@ class FileData; enum FilterIndexType { NONE, - FAVORITES_FILTER, - GENRE_FILTER, - PLAYER_FILTER, + RATINGS_FILTER, DEVELOPER_FILTER, PUBLISHER_FILTER, - RATINGS_FILTER, - KIDGAME_FILTER, + GENRE_FILTER, + PLAYER_FILTER, + FAVORITES_FILTER, COMPLETED_FILTER, - BROKEN_FILTER, + KIDGAME_FILTER, HIDDEN_FILTER, + BROKEN_FILTER, ALTEMULATOR_FILTER }; @@ -72,16 +72,16 @@ private: std::vector filterDataDecl; std::string getIndexableKey(FileData* game, FilterIndexType type, bool getSecondary); - void manageFavoritesEntryInIndex(FileData* game, bool remove = false); - void manageGenreEntryInIndex(FileData* game, bool remove = false); - void managePlayerEntryInIndex(FileData* game, bool remove = false); + void manageRatingsEntryInIndex(FileData* game, bool remove = false); void manageDeveloperEntryInIndex(FileData* game, bool remove = false); void managePublisherEntryInIndex(FileData* game, bool remove = false); - void manageRatingsEntryInIndex(FileData* game, bool remove = false); - void manageKidGameEntryInIndex(FileData* game, bool remove = false); + void manageGenreEntryInIndex(FileData* game, bool remove = false); + void managePlayerEntryInIndex(FileData* game, bool remove = false); + void manageFavoritesEntryInIndex(FileData* game, bool remove = false); void manageCompletedEntryInIndex(FileData* game, bool remove = false); - void manageBrokenEntryInIndex(FileData* game, bool remove = false); + void manageKidGameEntryInIndex(FileData* game, bool remove = false); void manageHiddenEntryInIndex(FileData* game, bool remove = false); + void manageBrokenEntryInIndex(FileData* game, bool remove = false); void manageAltemulatorEntryInIndex(FileData* game, bool remove = false); void manageIndexEntry(std::map* index, std::string key, bool remove); @@ -92,40 +92,40 @@ private: bool mFilterByText; bool mTextRemoveSystem; - bool mFilterByFavorites; - bool mFilterByGenre; - bool mFilterByPlayers; + bool mFilterByRatings; bool mFilterByDeveloper; bool mFilterByPublisher; - bool mFilterByRatings; - bool mFilterByKidGame; + bool mFilterByGenre; + bool mFilterByPlayers; + bool mFilterByFavorites; bool mFilterByCompleted; - bool mFilterByBroken; + bool mFilterByKidGame; bool mFilterByHidden; + bool mFilterByBroken; bool mFilterByAltemulator; - std::map mFavoritesIndexAllKeys; - std::map mGenreIndexAllKeys; - std::map mPlayersIndexAllKeys; + std::map mRatingsIndexAllKeys; std::map mDeveloperIndexAllKeys; std::map mPublisherIndexAllKeys; - std::map mRatingsIndexAllKeys; - std::map mKidGameIndexAllKeys; + std::map mGenreIndexAllKeys; + std::map mPlayersIndexAllKeys; + std::map mFavoritesIndexAllKeys; std::map mCompletedIndexAllKeys; - std::map mBrokenIndexAllKeys; + std::map mKidGameIndexAllKeys; std::map mHiddenIndexAllKeys; + std::map mBrokenIndexAllKeys; std::map mAltemulatorIndexAllKeys; - std::vector mFavoritesIndexFilteredKeys; - std::vector mGenreIndexFilteredKeys; - std::vector mPlayersIndexFilteredKeys; + std::vector mRatingsIndexFilteredKeys; std::vector mDeveloperIndexFilteredKeys; std::vector mPublisherIndexFilteredKeys; - std::vector mRatingsIndexFilteredKeys; - std::vector mKidGameIndexFilteredKeys; + std::vector mGenreIndexFilteredKeys; + std::vector mPlayersIndexFilteredKeys; + std::vector mFavoritesIndexFilteredKeys; std::vector mCompletedIndexFilteredKeys; - std::vector mBrokenIndexFilteredKeys; + std::vector mKidGameIndexFilteredKeys; std::vector mHiddenIndexFilteredKeys; + std::vector mBrokenIndexFilteredKeys; std::vector mAltemulatorIndexFilteredKeys; }; From f8b9275b4b69d7b5b0ef22fe02869d44c24bb9b1 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 11:14:52 +0200 Subject: [PATCH 10/21] Fixed a missing filter index update when removing games from custom collections. --- es-app/src/CollectionSystemsManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index df2ed075e..43999865f 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -692,6 +692,7 @@ bool CollectionSystemsManager::toggleGameInCollection(FileData* file) adding = false; // If we found it, we need to remove it. FileData* collectionEntry = children.at(key); + fileIndex->removeFromIndex(collectionEntry); ViewController::get() ->getGameListView(systemViewToUpdate) .get() From 7228491878292b089fc596779293784a61095a2e Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 12:03:12 +0200 Subject: [PATCH 11/21] Added alternative emulators to the gb, gba and gc systems. --- resources/systems/macos/es_systems.xml | 25 ++++++++++++++++++------ resources/systems/unix/es_systems.xml | 25 ++++++++++++++++++------ resources/systems/windows/es_systems.xml | 25 ++++++++++++++++++------ 3 files changed, 57 insertions(+), 18 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index 0457f49ff..bc3fa6aec 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -402,8 +402,13 @@ gb Nintendo Game Boy %ROMPATH%/gb - .sfc .SFC .smc .SMC .gb .GB .gbc .GBC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.dylib %ROM% + .bs .BS .cgb .CGB .dmg .DMG .gb .GB .gbc .GBC .sgb .SGB .sfc .SFC .smc .SMC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/sameboy_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gambatte_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearboy_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/tgbdual_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.dylib %ROM% gb gb @@ -411,8 +416,11 @@ gba Nintendo Game Boy Advance %ROMPATH%/gba - .gba .GBA .agb .AGB .bin .BIN .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_gba_libretro.dylib %ROM% + .agb .AGB .bin .BIN .cgb .CGB .dmg .DMG .gb .GB .gba .GBA .gbc .GBC .sgb .SGB .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mgba_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vbam_next_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vba_next_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gpsp_libretro.dylib %ROM% gba gba @@ -420,8 +428,13 @@ gbc Nintendo Game Boy Color %ROMPATH%/gbc - .sfc .SFC .smc .SMC .gb .GB .gbc .GBC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.dylib %ROM% + .bs .BS .cgb .CGB .dmg .DMG .gb .GB .gbc .GBC .sgb .SGB .sfc .SFC .smc .SMC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/sameboy_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gambatte_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearboy_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/tgbdual_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.dylib %ROM% gbc gbc diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index 83c0f653a..a1129e75a 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -403,8 +403,13 @@ gb Nintendo Game Boy %ROMPATH%/gb - .sfc .SFC .smc .SMC .gb .GB .gbc .GBC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.so %ROM% + .bs .BS .cgb .CGB .dmg .DMG .gb .GB .gbc .GBC .sgb .SGB .sfc .SFC .smc .SMC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/sameboy_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gambatte_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearboy_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/tgbdual_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.so %ROM% gb gb @@ -412,8 +417,11 @@ gba Nintendo Game Boy Advance %ROMPATH%/gba - .gba .GBA .agb .AGB .bin .BIN .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_gba_libretro.so %ROM% + .agb .AGB .bin .BIN .cgb .CGB .dmg .DMG .gb .GB .gba .GBA .gbc .GBC .sgb .SGB .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mgba_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vbam_next_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vba_next_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gpsp_libretro.so %ROM% gba gba @@ -421,8 +429,13 @@ gbc Nintendo Game Boy Color %ROMPATH%/gbc - .sfc .SFC .smc .SMC .gb .GB .gbc .GBC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.so %ROM% + .bs .BS .cgb .CGB .dmg .DMG .gb .GB .gbc .GBC .sgb .SGB .sfc .SFC .smc .SMC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/sameboy_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gambatte_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearboy_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/tgbdual_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.so %ROM% gbc gbc diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 62843d550..6e4071a65 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -403,8 +403,13 @@ gb Nintendo Game Boy %ROMPATH%\gb - .sfc .SFC .smc .SMC .gb .GB .gbc .GBC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bsnes_libretro.dll %ROM% + .bs .BS .cgb .CGB .dmg .DMG .gb .GB .gbc .GBC .sgb .SGB .sfc .SFC .smc .SMC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\sameboy_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\gambatte_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\gearboy_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\tgbdual_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen-s_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bsnes_libretro.dll %ROM% gb gb @@ -412,8 +417,11 @@ gba Nintendo Game Boy Advance %ROMPATH%\gba - .gba .GBA .agb .AGB .bin .BIN .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_gba_libretro.dll %ROM% + .agb .AGB .bin .BIN .cgb .CGB .dmg .DMG .gb .GB .gba .GBA .gbc .GBC .sgb .SGB .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mgba_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vbam_next_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vba_next_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\gpsp_libretro.dll %ROM% gba gba @@ -421,8 +429,13 @@ gbc Nintendo Game Boy Color %ROMPATH%\gbc - .sfc .SFC .smc .SMC .gb .GB .gbc .GBC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bsnes_libretro.dll %ROM% + .bs .BS .cgb .CGB .dmg .DMG .gb .GB .gbc .GBC .sgb .SGB .sfc .SFC .smc .SMC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\sameboy_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\gambatte_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\gearboy_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\tgbdual_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen-s_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bsnes_libretro.dll %ROM% gbc gbc From f435cb5b746352eea97ab1c13618b8b33f57c796 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 12:21:13 +0200 Subject: [PATCH 12/21] Added alternative emulators to the n3ds and nds systems. --- resources/systems/macos/es_systems.xml | 9 ++++++--- resources/systems/unix/es_systems.xml | 9 ++++++--- resources/systems/windows/es_systems.xml | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index bc3fa6aec..23187816e 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -665,7 +665,8 @@ Nintendo 3DS %ROMPATH%/n3ds .3ds .3DS .3dsx .3DSX .app .APP .axf .AXF .cci .CCI .cxi .CXI .elf .ELF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/citra_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/citra_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/citra2018_libretro.dylib %ROM% n3ds n3ds @@ -700,8 +701,10 @@ nds Nintendo DS %ROMPATH%/nds - .nds .NDS .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/melonds_libretro.dylib %ROM% + .bin .BIN .nds .NDS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/desmume_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/desmume2015_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/melonds_libretro.dylib %ROM% nds nds diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index a1129e75a..755e7553b 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -666,7 +666,8 @@ Nintendo 3DS %ROMPATH%/n3ds .3ds .3DS .3dsx .3DSX .app .APP .axf .AXF .cci .CCI .cxi .CXI .elf .ELF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/citra_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/citra_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/citra2018_libretro.so %ROM% n3ds n3ds @@ -702,8 +703,10 @@ nds Nintendo DS %ROMPATH%/nds - .nds .NDS .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/melonds_libretro.so %ROM% + .bin .BIN .nds .NDS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/desmume_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/desmume2015_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/melonds_libretro.so %ROM% nds nds diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 6e4071a65..394491c3f 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -666,7 +666,8 @@ Nintendo 3DS %ROMPATH%\n3ds .3ds .3DS .3dsx .3DSX .app .APP .axf .AXF .cci .CCI .cxi .CXI .elf .ELF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\citra_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\citra_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\citra2018_libretro.dll %ROM% n3ds n3ds @@ -702,8 +703,10 @@ nds Nintendo DS %ROMPATH%\nds - .nds .NDS .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\melonds_libretro.dll %ROM% + .bin .BIN .nds .NDS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\desmume_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\desmume2015_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\melonds_libretro.dll %ROM% nds nds From 5e23cb6989fc8b947c3daf9a4c46aa11916f992b Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 13:10:12 +0200 Subject: [PATCH 13/21] Added alternative emulators to the amstradcpc, atarilynx, ngp, ngpc, pc98, saturn and saturnjp systems. --- resources/systems/macos/es_systems.xml | 27 +++++++++++++-------- resources/systems/unix/es_systems.xml | 31 ++++++++++++++++-------- resources/systems/windows/es_systems.xml | 31 ++++++++++++++++-------- 3 files changed, 59 insertions(+), 30 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index 23187816e..db1b290e2 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -68,8 +68,9 @@ amstradcpc Amstrad CPC %ROMPATH%/amstradcpc - .dsk .DSK .sna .SNA .tap .TAR .cdt .CDT .voc .VOC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/cap32_libretro.dylib %ROM% + .cdt .CDT .cpr .CPR .dsk .DSK .kcr .KCR .m3u .M3U .sna .SNA .tap .TAR .voc .VOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/cap32_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/crocods_libretro.dylib %ROM% amstradcpc amstradcpc @@ -174,7 +175,8 @@ Atari Lynx %ROMPATH%/atarilynx .lnx .LNX .o .O .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_lynx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/handy_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_lynx_libretro.dylib %ROM% atarilynx atarilynx @@ -752,7 +754,8 @@ SNK Neo Geo Pocket %ROMPATH%/ngp .ngp .NGP .ngc .NGC .ngpc .NGPC .npc .NPC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_ngp_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_ngp_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/race_libretro.dylib %ROM% ngp ngp @@ -761,7 +764,8 @@ SNK Neo Geo Pocket Color %ROMPATH%/ngpc .ngp .NGP .ngc .NGC .ngpc .NGPC .npc .NPC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_ngp_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_ngp_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/race_libretro.dylib %ROM% ngpc ngpc @@ -826,7 +830,8 @@ NEC PC-9800 series %ROMPATH%/pc98 .2hd .2HD .88d .88D .98d .98D .d88 .D88 .d98 .D98 .cmd .CMD .dup .DUP .fdd .FDD .fdi .FDI .hdd .HDD .hdi .HDI .hdm .HDM .hdn .HDN .nhd .NHD .tfd .TFD .thd .THD . xdf .XDF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/np2kai_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/np2kai_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/nekop2_libretro.dylib %ROM% pc98 pc98 @@ -965,8 +970,9 @@ saturn Sega Saturn %ROMPATH%/saturn - .ccd .CCD .chd .CHD .cue .CUE .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_saturn_libretro.dylib %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .iso .ISO .mds .MDS .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_saturn_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/yabause_libretro.dylib %ROM% saturn saturn @@ -974,8 +980,9 @@ saturnjp Sega Saturn %ROMPATH%/saturnjp - .ccd .CCD .chd .CHD .cue .CUE .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_saturn_libretro.dylib %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .iso .ISO .mds .MDS .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_saturn_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/yabause_libretro.dylib %ROM% saturn saturnjp diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index 755e7553b..830068d73 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -69,8 +69,9 @@ amstradcpc Amstrad CPC %ROMPATH%/amstradcpc - .dsk .DSK .sna .SNA .tap .TAR .cdt .CDT .voc .VOC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/cap32_libretro.so %ROM% + .cdt .CDT .cpr .CPR .dsk .DSK .kcr .KCR .m3u .M3U .sna .SNA .tap .TAR .voc .VOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/cap32_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/crocods_libretro.so %ROM% amstradcpc amstradcpc @@ -175,7 +176,8 @@ Atari Lynx %ROMPATH%/atarilynx .lnx .LNX .o .O .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_lynx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/handy_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_lynx_libretro.so %ROM% atarilynx atarilynx @@ -754,7 +756,8 @@ SNK Neo Geo Pocket %ROMPATH%/ngp .ngp .NGP .ngc .NGC .ngpc .NGPC .npc .NPC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_ngp_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_ngp_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/race_libretro.so %ROM% ngp ngp @@ -763,7 +766,8 @@ SNK Neo Geo Pocket Color %ROMPATH%/ngpc .ngp .NGP .ngc .NGC .ngpc .NGPC .npc .NPC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_ngp_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_ngp_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/race_libretro.so %ROM% ngpc ngpc @@ -828,7 +832,8 @@ NEC PC-9800 series %ROMPATH%/pc98 .2hd .2HD .88d .88D .98d .98D .d88 .D88 .d98 .D98 .cmd .CMD .dup .DUP .fdd .FDD .fdi .FDI .hdd .HDD .hdi .HDI .hdm .HDM .hdn .HDN .nhd .NHD .tfd .TFD .thd .THD . xdf .XDF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/np2kai_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/np2kai_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/nekop2_libretro.so %ROM% pc98 pc98 @@ -967,8 +972,11 @@ saturn Sega Saturn %ROMPATH%/saturn - .ccd .CCD .chd .CHD .cue .CUE .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_saturn_libretro.so %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .iso .ISO .mds .MDS .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_saturn_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/kronos_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/yabasanshiro_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/yabause_libretro.so %ROM% saturn saturn @@ -976,8 +984,11 @@ saturnjp Sega Saturn %ROMPATH%/saturnjp - .ccd .CCD .chd .CHD .cue .CUE .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_saturn_libretro.so %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .iso .ISO .mds .MDS .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_saturn_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/kronos_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/yabasanshiro_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/yabause_libretro.so %ROM% saturn saturnjp diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 394491c3f..1c2560b7e 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -69,8 +69,9 @@ amstradcpc Amstrad CPC %ROMPATH%\amstradcpc - .dsk .DSK .sna .SNA .tap .TAR .cdt .CDT .voc .VOC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\cap32_libretro.dll %ROM% + .cdt .CDT .cpr .CPR .dsk .DSK .kcr .KCR .m3u .M3U .sna .SNA .tap .TAR .voc .VOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\cap32_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\crocods_libretro.dll %ROM% amstradcpc amstradcpc @@ -175,7 +176,8 @@ Atari Lynx %ROMPATH%\atarilynx .lnx .LNX .o .O .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_lynx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\handy_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_lynx_libretro.dll %ROM% atarilynx atarilynx @@ -754,7 +756,8 @@ SNK Neo Geo Pocket %ROMPATH%\ngp .ngp .NGP .ngc .NGC .ngpc .NGPC .npc .NPC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_ngp_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_ngp_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\race_libretro.dll %ROM% ngp ngp @@ -763,7 +766,8 @@ SNK Neo Geo Pocket Color %ROMPATH%\ngpc .ngp .NGP .ngc .NGC .ngpc .NGPC .npc .NPC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_ngp_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_ngp_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\race_libretro.dll %ROM% ngpc ngpc @@ -828,7 +832,8 @@ NEC PC-9800 series %ROMPATH%\pc98 .2hd .2HD .88d .88D .98d .98D .d88 .D88 .d98 .D98 .cmd .CMD .dup .DUP .fdd .FDD .fdi .FDI .hdd .HDD .hdi .HDI .hdm .HDM .hdn .HDN .nhd .NHD .tfd .TFD .thd .THD . xdf .XDF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\np2kai_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\np2kai_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\nekop2_libretro.dll %ROM% pc98 pc98 @@ -967,8 +972,11 @@ saturn Sega Saturn %ROMPATH%\saturn - .ccd .CCD .chd .CHD .cue .CUE .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_saturn_libretro.dll %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .iso .ISO .mds .MDS .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_saturn_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\kronos_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\yabasanshiro_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\yabause_libretro.dll %ROM% saturn saturn @@ -976,8 +984,11 @@ saturnjp Sega Saturn %ROMPATH%\saturnjp - .ccd .CCD .chd .CHD .cue .CUE .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_saturn_libretro.dll %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .iso .ISO .mds .MDS .toc .TOC .m3u .M3U .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_saturn_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\kronos_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\yabasanshiro_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\yabause_libretro.dll %ROM% saturn saturnjp From b33da81f4f956ede457d4dd9fc2b501e0800eb23 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 13:23:10 +0200 Subject: [PATCH 14/21] Added alternative emulators to the msx, msx1 and msx2 systems. --- resources/systems/macos/es_systems.xml | 9 ++++++--- resources/systems/unix/es_systems.xml | 9 ++++++--- resources/systems/windows/es_systems.xml | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index db1b290e2..85837db54 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -622,7 +622,8 @@ MSX %ROMPATH%/msx .rom .ROM .ri .RI .mx1 .MX1 .mx2 .MX2 .col .COL .dsk .DSK .cas .CAS .sg .SG .sc .SC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fmsx_libretro.dylib %ROM% msx msx @@ -631,7 +632,8 @@ MSX1 %ROMPATH%/msx1 .rom .ROM .ri .RI .mx1 .MX1 .mx2 .MX2 .col .COL .dsk .DSK .cas .CAS .sg .SG .sc .SC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fmsx_libretro.dylib %ROM% msx msx1 @@ -640,7 +642,8 @@ MSX2 %ROMPATH%/msx2 .rom .ROM .ri .RI .mx1 .MX1 .mx2 .MX2 .col .COL .dsk .DSK .cas .CAS .sg .SG .sc .SC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fmsx_libretro.dylib %ROM% msx2 msx2 diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index 830068d73..bc2859998 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -623,7 +623,8 @@ MSX %ROMPATH%/msx .rom .ROM .ri .RI .mx1 .MX1 .mx2 .MX2 .col .COL .dsk .DSK .cas .CAS .sg .SG .sc .SC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fmsx_libretro.so %ROM% msx msx @@ -632,7 +633,8 @@ MSX1 %ROMPATH%/msx1 .rom .ROM .ri .RI .mx1 .MX1 .mx2 .MX2 .col .COL .dsk .DSK .cas .CAS .sg .SG .sc .SC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fmsx_libretro.so %ROM% msx msx1 @@ -641,7 +643,8 @@ MSX2 %ROMPATH%/msx2 .rom .ROM .ri .RI .mx1 .MX1 .mx2 .MX2 .col .COL .dsk .DSK .cas .CAS .sg .SG .sc .SC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fmsx_libretro.so %ROM% msx2 msx2 diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 1c2560b7e..e252aafc6 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -623,7 +623,8 @@ MSX %ROMPATH%\msx .rom .ROM .ri .RI .mx1 .MX1 .mx2 .MX2 .col .COL .dsk .DSK .cas .CAS .sg .SG .sc .SC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bluemsx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bluemsx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fmsx_libretro.dll %ROM% msx msx @@ -632,7 +633,8 @@ MSX1 %ROMPATH%\msx1 .rom .ROM .ri .RI .mx1 .MX1 .mx2 .MX2 .col .COL .dsk .DSK .cas .CAS .sg .SG .sc .SC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bluemsx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bluemsx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fmsx_libretro.dll %ROM% msx msx1 @@ -641,7 +643,8 @@ MSX2 %ROMPATH%\msx2 .rom .ROM .ri .RI .mx1 .MX1 .mx2 .MX2 .col .COL .dsk .DSK .cas .CAS .sg .SG .sc .SC .m3u .M3U .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bluemsx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bluemsx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fmsx_libretro.dll %ROM% msx2 msx2 From 3e8f7d17619b87c78807be7b7492e05ca8519d3e Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 14:44:00 +0200 Subject: [PATCH 15/21] Added alternative emulators to the gamegear, megacd, megacdjp, segacd and sg-1000 systems. --- resources/systems/macos/es_systems.xml | 32 ++++++++++++++++-------- resources/systems/unix/es_systems.xml | 32 ++++++++++++++++-------- resources/systems/windows/es_systems.xml | 32 ++++++++++++++++-------- 3 files changed, 66 insertions(+), 30 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index 85837db54..68ed65242 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -395,8 +395,11 @@ gamegear Sega Game Gear %ROMPATH%/gamegear - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .col .COL .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .rom .ROM .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearsystem_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/smsplus_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.dylib %ROM% gamegear gamegear @@ -564,8 +567,10 @@ megacd Sega Mega-CD %ROMPATH%/megacd - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/picodrive_libretro.dylib %ROM% segacd megacd @@ -573,8 +578,10 @@ megacdjp Sega Mega-CD %ROMPATH%/megacdjp - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/picodrive_libretro.dylib %ROM% segacd megacdjp @@ -1029,8 +1036,10 @@ segacd Sega CD %ROMPATH%/segacd - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/picodrive_libretro.dylib %ROM% segacd segacd @@ -1038,8 +1047,11 @@ sg-1000 Sega SG-1000 %ROMPATH%/sg-1000 - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .ri .RI .rom .ROM .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearsystem_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.dylib %ROM% sg-1000 sg-1000 diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index bc2859998..b1d0abe87 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -396,8 +396,11 @@ gamegear Sega Game Gear %ROMPATH%/gamegear - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .col .COL .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .rom .ROM .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearsystem_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/smsplus_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.so %ROM% gamegear gamegear @@ -565,8 +568,10 @@ megacd Sega Mega-CD %ROMPATH%/megacd - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/picodrive_libretro.so %ROM% segacd megacd @@ -574,8 +579,10 @@ megacdjp Sega Mega-CD %ROMPATH%/megacdjp - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/picodrive_libretro.so %ROM% segacd megacdjp @@ -1035,8 +1042,10 @@ segacd Sega CD %ROMPATH%/segacd - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/picodrive_libretro.so %ROM% segacd segacd @@ -1044,8 +1053,11 @@ sg-1000 Sega SG-1000 %ROMPATH%/sg-1000 - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .ri .RI .rom .ROM .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearsystem_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bluemsx_libretro.so %ROM% sg-1000 sg-1000 diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index e252aafc6..99177075e 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -396,8 +396,11 @@ gamegear Sega Game Gear %ROMPATH%\gamegear - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .col .COL .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .rom .ROM .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\gearsystem_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\smsplus_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_wide_libretro.dll %ROM% gamegear gamegear @@ -565,8 +568,10 @@ megacd Sega Mega-CD %ROMPATH%\megacd - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_wide_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\picodrive_libretro.dll %ROM% segacd megacd @@ -574,8 +579,10 @@ megacdjp Sega Mega-CD %ROMPATH%\megacdjp - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_wide_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\picodrive_libretro.dll %ROM% segacd megacdjp @@ -1035,8 +1042,10 @@ segacd Sega CD %ROMPATH%\segacd - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_wide_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\picodrive_libretro.dll %ROM% segacd segacd @@ -1044,8 +1053,11 @@ sg-1000 Sega SG-1000 %ROMPATH%\sg-1000 - .mdx .MDX .md .MD .smd .SMD .gen .GEN .bin .BIN .cue .CUE .iso .ISO .sms .SMS .gg .GG .sg .SG .68k .68K .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + .68k .68K .bin .BIN .bms .BMS .chd .CHD .cue .CUE .gen .GEN .gg .GG .iso .ISO .m3u .M3U .md .MD .mdx .MDX .ri .RI .rom .ROM .sg .SG .sgd .SGD .smd .SMD .sms .SMS .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\gearsystem_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_wide_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bluemsx_libretro.dll %ROM% sg-1000 sg-1000 From 1abcdcfc5dbac5060d64b8c5ed2ab3952e869066 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 15:02:57 +0200 Subject: [PATCH 16/21] Added alternative emulators to the satellaview and sufami systems. --- resources/systems/macos/es_systems.xml | 15 +++++++++++---- resources/systems/unix/es_systems.xml | 15 +++++++++++---- resources/systems/windows/es_systems.xml | 15 +++++++++++---- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index 68ed65242..f85f77f7f 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -971,8 +971,12 @@ satellaview Nintendo Satellaview %ROMPATH%/satellaview - .smc .SMC .sfc .SFC .swc .SWC .fig .FIG .bs .BS .bin .BIN .mgd .MGD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.dylib %ROM% + .bml .BML .bs .BS .fig .FIG .sfc .SFC .smc .SMC .swc .SWC .st .ST .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x2010_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_mercury_accuracy_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_libretro.dylib %ROM% satellaview satellaview @@ -1121,8 +1125,11 @@ sufami Bandai SuFami Turbo %ROMPATH%/sufami - .smc .SMC .sfc .SFC .swc .SWC .fig .FIG .bs .BS .bin .BIN .mgd .MGD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.dylib %ROM% + .bml .BML .bs .BS .fig .FIG .sfc .SFC .smc .SMC .st .ST .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x2010_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_mercury_accuracy_libretro.dylib %ROM% sufami sufami diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index b1d0abe87..22c1d38a9 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -973,8 +973,12 @@ satellaview Nintendo Satellaview %ROMPATH%/satellaview - .smc .SMC .sfc .SFC .swc .SWC .fig .FIG .bs .BS .bin .BIN .mgd .MGD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.so %ROM% + .bml .BML .bs .BS .fig .FIG .sfc .SFC .smc .SMC .swc .SWC .st .ST .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x2010_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_mercury_accuracy_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_libretro.so %ROM% satellaview satellaview @@ -1129,8 +1133,11 @@ sufami Bandai SuFami Turbo %ROMPATH%/sufami - .smc .SMC .sfc .SFC .swc .SWC .fig .FIG .bs .BS .bin .BIN .mgd .MGD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.so %ROM% + .bml .BML .bs .BS .fig .FIG .sfc .SFC .smc .SMC .st .ST .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x2010_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_mercury_accuracy_libretro.so %ROM% sufami sufami diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 99177075e..ee281a624 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -973,8 +973,12 @@ satellaview Nintendo Satellaview %ROMPATH%\satellaview - .smc .SMC .sfc .SFC .swc .SWC .fig .FIG .bs .BS .bin .BIN .mgd .MGD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\snes9x_libretro.dll %ROM% + .bml .BML .bs .BS .fig .FIG .sfc .SFC .smc .SMC .swc .SWC .st .ST .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\snes9x_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\snes9x2010_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bsnes_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bsnes_mercury_accuracy_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen-s_libretro.dll %ROM% satellaview satellaview @@ -1129,8 +1133,11 @@ sufami Bandai SuFami Turbo %ROMPATH%\sufami - .smc .SMC .sfc .SFC .swc .SWC .fig .FIG .bs .BS .bin .BIN .mgd .MGD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\snes9x_libretro.dll %ROM% + .bml .BML .bs .BS .fig .FIG .sfc .SFC .smc .SMC .st .ST .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\snes9x_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\snes9x2010_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bsnes_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\bsnes_mercury_accuracy_libretro.dll %ROM% sufami sufami From c010030db667f66d8866b47e0022e41e61ae70fb Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 16:00:52 +0200 Subject: [PATCH 17/21] Shortened the full name for the videopac system. --- resources/systems/macos/es_systems.xml | 2 +- resources/systems/unix/es_systems.xml | 2 +- resources/systems/windows/es_systems.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index f85f77f7f..ffe09a5d2 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -1236,7 +1236,7 @@ videopac - Philips Videopac G7000 (Magnavox Odyssey2) + Philips Videopac G7000 %ROMPATH%/videopac .bin .BIN .7z .7Z .zip .ZIP %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/o2em_libretro.dylib %ROM% diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index 22c1d38a9..fa1976071 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -1245,7 +1245,7 @@ videopac - Philips Videopac G7000 (Magnavox Odyssey2) + Philips Videopac G7000 %ROMPATH%/videopac .bin .BIN .7z .7Z .zip .ZIP %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/o2em_libretro.so %ROM% diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index ee281a624..9dbbea775 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -1245,7 +1245,7 @@ videopac - Philips Videopac G7000 (Magnavox Odyssey2) + Philips Videopac G7000 %ROMPATH%\videopac .bin .BIN .7z .7Z .zip .ZIP %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\o2em_libretro.dll %ROM% From 1917bfba745c75bc6f03f1938f0b6cfc98afc780 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 16:06:08 +0200 Subject: [PATCH 18/21] Some cosmetic changes to the alternative emulators GUI. --- es-app/src/guis/GuiAlternativeEmulators.cpp | 36 +++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/es-app/src/guis/GuiAlternativeEmulators.cpp b/es-app/src/guis/GuiAlternativeEmulators.cpp index ccf26c313..50420a17b 100644 --- a/es-app/src/guis/GuiAlternativeEmulators.cpp +++ b/es-app/src/guis/GuiAlternativeEmulators.cpp @@ -118,14 +118,8 @@ GuiAlternativeEmulators::GuiAlternativeEmulators(Window* window) mMenu.addRow(row); } - float width = - static_cast(std::min(static_cast(Renderer::getScreenHeight() * 1.05f), - static_cast(Renderer::getScreenWidth() * 0.90f))); - setSize(mMenu.getSize()); setPosition((Renderer::getScreenWidth() - mSize.x) / 2.0f, Renderer::getScreenHeight() * 0.13f); - - mMenu.setSize(width, Renderer::getScreenHeight() * 0.76f); } void GuiAlternativeEmulators::updateMenu(const std::string& systemName, @@ -162,7 +156,7 @@ void GuiAlternativeEmulators::selectorWindow(SystemData* system) label = entry.second; std::shared_ptr labelText = std::make_shared( - mWindow, label, Font::get(FONT_SIZE_MEDIUM), 0x777777FF, ALIGN_CENTER); + mWindow, label, Font::get(FONT_SIZE_MEDIUM), 0x777777FF, ALIGN_LEFT); if (system->getSystemEnvData()->mLaunchCommands.front().second == label) labelText->setValue(labelText->getValue().append(" [DEFAULT]")); @@ -213,21 +207,37 @@ void GuiAlternativeEmulators::selectorWindow(SystemData* system) s->addRow(row, false); } - // Adjust the width depending on the aspect ratio of the screen, to make the screen look + // Set a maximum width depending on the aspect ratio of the screen, to make the screen look // somewhat coherent regardless of screen type. The 1.778 aspect ratio value is the 16:9 // reference. float aspectValue = 1.778f / Renderer::getScreenAspectRatio(); - - float maxWidthModifier = glm::clamp(0.70f * aspectValue, 0.50f, 0.92f); + float maxWidthModifier = glm::clamp(0.72f * aspectValue, 0.50f, 0.92f); float maxWidth = static_cast(Renderer::getScreenWidth()) * maxWidthModifier; - s->setMenuSize(glm::vec2{maxWidth, s->getMenuSize().y}); + // Set the width of the selector window to the menu width, unless the system full name is + // too large to fit. If so, allow the size to be exceeded up to the maximum size calculated + // above. + float systemTextWidth = + Font::get(FONT_SIZE_LARGE)->sizeText(Utils::String::toUpper(system->getFullName())).x * + 1.05f; + + float width = 0.0f; + float menuWidth = mMenu.getSize().x; + + if (systemTextWidth <= menuWidth) + width = menuWidth; + else if (systemTextWidth > maxWidth) + width = maxWidth; + else + width = systemTextWidth; + + s->setMenuSize(glm::vec2{width, s->getMenuSize().y}); auto menuSize = s->getMenuSize(); auto menuPos = s->getMenuPosition(); - s->setMenuPosition(glm::vec3{(s->getSize().x - menuSize.x) / 2.0f, - (s->getSize().y - menuSize.y) / 3.0f, menuPos.z}); + s->setMenuPosition(glm::vec3{(s->getSize().x - menuSize.x) / 2.0f, menuPos.y, menuPos.z}); + mWindow->pushGui(s); } From ba07a0b24c1435fbb3d215117aadedd42d880417 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 26 Sep 2021 18:23:01 +0200 Subject: [PATCH 19/21] Documentation update. --- CHANGELOG.md | 12 +++++- INSTALL-DEV.md | 54 +++++++++++++++++++++---- USERGUIDE-DEV.md | 101 +++++++++++++++++++++++++++-------------------- USERGUIDE.md | 13 ++++++ 4 files changed, 127 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5557eb114..6c0757c58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,14 @@ ### Detailed list of changes * Added alternative emulators support where additional emulators can be defined in es_systems.xml and be selected system-wide or per game via the user interface +* Populated the bundled es_systems.xml files with alternative emulator entries for must RetroArch cores * Added a virtual keyboard partly based on code from batocera-emulationstation * Added the ability to make complementary game system customizations without having to replace the entire bundled es_systems.xml file +* Added support for an optional \ tag for es_systems.xml that can be used to override the default \ systems sorting +* Improved the gamelist filter screen to not allow filtering of values where there is no actual data to filter, e.g. Favorites for a system with no favorite games +* Grayed out all fields in the gamelist filter screen where there is no data to filter, previously some fields were removed entirely and some could still be used +* Added the ability to filter on blank/unknown values for Genre, Player, Developer, Publisher and Alternative emulator. +* Added a filter for "Alternative emulator" and sorted the filters in the same order as the metadata editor fields * Added a menu option to change the application exit key combination * Expanded the themeable options for "helpsystem" to support custom button graphics, dimmed text and icon colors, upper/lower/camel case and custom spacing * Added support for using the left and right trigger buttons in the help prompts @@ -24,6 +30,8 @@ * Moved the game media directory setting to the top of the Other Settings menu, following the new Alternative Emulators entry * Added a blinking cursor to TextEditComponent * Changed the filter description "Text filter (game name)" to "Game name" +* Added support for multi-select total count and exclusive multi-select to OptionListComponent +* Achieved a massive speed improvement for OptionListComponent by not resizing each added MenuComponent row (most notable in the filter GUI) * Added support for a new type of "flat style" button to ButtonComponent * Added support for correctly navigating arbitrarily sized ComponentGrid entries, i.e. those spanning multiple cells * Bundled the bold font version of Fontfabric Akrobat @@ -32,6 +40,7 @@ * Replaced some additional math functions and moved the remaining built-in functions to a math utility namespace * Added a function to generate MD5 hashes * Moved the "complex" mode functionality from GuiComplexTextEditPopup into GuiTextEditPopup and removed the source files for the former +* Replaced the String::Utils::trim function with better code and removed some inline text trimming throughout the application * Increased the warning level for Clang/LLVM and GCC by adding -Wall, -Wpedantic and some additional flags * Fixed a lot of compiler warnings introduced by the -Wall and -Wpedantic flags * Changed the language standard from C++14 to C++17 @@ -44,6 +53,7 @@ * When multi-scraping in interactive mode, the game counter was not decreased when skipping games, making it impossible to skip the final games in the queue * When multi-scraping in interactive mode, "No games found" results could be accepted using the "A" button * When scraping in interactive mode, any refining done using the "Y" button shortcut would not be shown when doing another refine using the "Refine search" button +* Removing games from custom collections did not remove their filter index entries * Input consisting of only whitespace characters would get accepted by TextEditComponent which led to various strange behaviors * Leading and trailing whitespace characters would not get trimmed from the collection name when creating a new custom collection * Leading and trailing whitespace characters would get included in scraper search refines and TheGamesDB searches @@ -334,6 +344,4 @@ Many bugs have been fixed, and numerous features that were only partially implem * There is an issue with launching games on Windows when using AMD and Intel GPUs. This causes the emulator to just output a blank screen. There is a workaround available for this which is enabled by default and that can be disabled via the menu option "AMD and Intel GPU game launch workaround". The drawback of this workaround is that a white instead of a black screen will be displayed when launching games. If using an Nvidia GPU, it should be safe to disable this option for a slightly better user experience. An alternative workaround is to enable the option "Run in background (while game is launched)". -* On macOS Big Sur (and possibly other OS versions) when connecting a DualShock 4 controller either via Bluetooth or using a USB cable, two separate controller devices are registered in parallel. This is a bug in either macOS or the DualShock driver and it makes it seem as if ES-DE is registering double button presses when actually two separate controller devices are generating identical input. A workaround if using Bluetooth mode is to plug in the USB cable just after connecting the controller, wait a second or two and then remove the cable again. This will remove the cabled device, leaving only the Bluetooth device active. Another workaround is to enable the setting "Only accept input from first controller" in the ES-DE input device settings. The reason why this bug may not be visible in some other games and applications is that ES-DE enables and auto-configures all connected controllers. - * On Windows when using high DPI displays, if not running ES-DE on the primary monitor and the display where it runs does not have the same scaling percentage as the primary monitor, then the ES-DE resolution will not be properly set. The application will still work and if running in fullscreen mode it may not even be noticeable. This issue is caused by a bug in SDL where the primary display scaling is always used for calculating the display bounds and as such it needs to be fixed in that library. If using the same scaling percentage across all monitors, or if not using high DPI monitors at all, then this issue will not occur. diff --git a/INSTALL-DEV.md b/INSTALL-DEV.md index e7db548c6..f3af62b19 100644 --- a/INSTALL-DEV.md +++ b/INSTALL-DEV.md @@ -1409,7 +1409,7 @@ This custom file functionality is designed to be complementary to the bundled es The bundled es_systems.xml file is located in the resources directory that is part of the application installation. For example this could be `/usr/share/emulationstation/resources/systems/unix/es_systems.xml` on Unix, `/Applications/EmulationStation Desktop Edition.app/Contents/Resources/resources/systems/macos/es_systems.xml` on macOS or `C:\Program Files\EmulationStation-DE\resources\systems\windows\es_systems.xml` on Windows. The actual location may differ from these examples of course, depending on where ES-DE has been installed. -It doesn't matter in which order you define the systems as they will be sorted by the full system name inside the application, but it's still probably a good idea to add them in alphabetical order to make the file easier to maintain. +It doesn't matter in which order you define the systems as they will be sorted by the `` tag or by the optional `` tag when displayed inside the application. But it's still a good idea to add the systems in alphabetical order to make the configuration file easier to maintain. Keep in mind that you have to set up your emulators separately from ES-DE as the es_systems.xml file assumes that your emulator environment is properly configured. @@ -1430,6 +1430,12 @@ Below is an overview of the file layout with various examples. For the command t Nintendo SNES (Super Nintendo) + + Super Nintendo + @@ -1444,13 +1450,15 @@ Below is an overview of the file layout with various examples. For the command t file. This is the recommended way to configure the launch command. --> %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.so %ROM% - - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/nestopia_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fceumm_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/quicknes_libretro.so %ROM% + + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x2010_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_mercury_accuracy_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_supafaust_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_libretro.so %ROM% + + + nes + Nintendo Entertainment System + %ROMPATH%/nes + .nes .NES .zip .ZIP + /usr/games/fceux %ROM% + nes + nes + + + snes + Super Nintendo + Nintendo SNES (Super Nintendo) + %ROMPATH%/snes + .smc .SMC .sfc .SFC .swc .SWC .bin .BIN .mgd .MGD .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/snes9x2010_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/bsnes_libretro.so %ROM% + snes + snes + + +``` + ## es_find_rules.xml This file makes it possible to define rules for where to search for the emulator binaries and emulator cores. diff --git a/USERGUIDE-DEV.md b/USERGUIDE-DEV.md index 4d75dc06b..25ffbd132 100644 --- a/USERGUIDE-DEV.md +++ b/USERGUIDE-DEV.md @@ -128,6 +128,18 @@ There will be a lot of directories created if using the es_systems.xml file bund _This is the dialog shown if no game files were found. It lets you configure the ROM directory if you don't want to use the default one, and you can also generate the game systems directory structure. Note that the directory is the physical path, and that your operating system may present this as a localized path if you are using a language other than English._ +## Specific notes for macOS + +On macOS, the first time you launch a game from within ES-DE, the operating system will present you with a security option with the following description: + +`"EmulationStation Desktop Edition" would like to access files in your Documents folder.` + +If you don't allow this, you will not be able to place system BIOS ROMs in the RetroArch default system directory `~/Documents/RetroArch/system` even if you've already given RetroArch access to this folder. This is so because RetroArch runs as a subprocess to ES-DE and therefore inherits the security settings from the parent application. Attempting to launch a game without enabling the access will simply display an error message in the emulator that the BIOS files are missing. This of course only applies to emulators that require BIOS ROMs, all other games should work fine regardless of this security setting. + +If you accidentally refused ES-DE the folder access, you can fix this by opening _System Preferences_, selecting _Security & Privacy_ and within the GUI choose _Files and Folders_. The option you need to enable is _Documents Folder_ under _EmulationStation Desktop Edition_. + +Another issue on macOS 11 Big Sur (and possibly other OS versions) is that when connecting a DualShock 4 controller either via Bluetooth or using a USB cable, two separate controller devices are registered in parallel. This is a bug in either macOS or the DualShock driver and it makes it seem as if ES-DE is registering double button presses when actually two separate controller devices are generating identical input. A workaround if using Bluetooth mode is to plug in the USB cable just after connecting the controller, wait a second or two and then remove the cable again. This will remove the cabled device, leaving only the Bluetooth device active. Another workaround is to enable the setting _Only accept input from first controller_ in the ES-DE input device settings. The reason why this bug may not be visible in some other games and applications is that ES-DE enables and auto-configures all connected controllers. + ## Game system customizations The game systems configuration file `es_systems.xml` is located in the ES-DE resources directory which is part of the application installation. As such this file is not intended to be modified directly. If system customizations are required, a separate es_systems.xml file should instead be placed in the `custom_systems` folder in the ES-DE home directory, i.e. `~/.emulationstation/custom_systems/es_systems.xml`. @@ -136,7 +148,7 @@ Although it's possible to make a copy of the bundled configuration file, to modi For example you may want to replace the emulator launch command, modify the full name or change the supported file extensions for a single system. In this case it wouldn't make sense to copy the complete bundled file and just apply these minor modifications, instead an es_systems.xml file only containing the configuration for that single system should be placed in the custom_systems directory. -The instructions for how to customize the es_systems.xml file can be found in [INSTALL-DEV.md](INSTALL-DEV.md#es_systemsxml). There you can also find an example of a custom file that you can copy into ~/.emulationstation/custom_systems/ and modify as required. +The instructions for how to customize the es_systems.xml file can be found in [INSTALL-DEV.md](INSTALL-DEV.md#es_systemsxml). There you can also find some examples of custom files that you can copy into ~/.emulationstation/custom_systems/ and modify as required. ## Migrating from other EmulationStation forks @@ -179,9 +191,9 @@ If you experience double button presses with your DualShock 4 controller on macO When starting ES-DE with the default settings, you will see the System view first. From here you can navigate your game systems and enter their respective gamelists. -Depending on the theme, the system navigation carousel can be either horizontal or vertical. The default theme rbsimple-DE provides horizontal navigation, i.e. you browse your systems by scrolling left or right. +Depending on the theme, the system navigation carousel can be horizontal, vertical or displayed as a wheel. The default theme rbsimple-DE provides horizontal navigation, i.e. you browse your systems by scrolling left or right. -The game systems are sorted by their full names, as defined in the es_systems.xml file. +The game systems are sorted by their full names by default, as defined in the es_systems.xml file. It's however possible to set a custom sortname per system, as explained in the [INSTALL-DEV.md](INSTALL-DEV.md#es_systemsxml) document. ![alt text](images/es-de_system_view.png "ES-DE System View") _The **System view** is the default starting point for the application, it's here that you browse through your game systems._ @@ -1332,25 +1344,29 @@ The following filters can be applied: **Game name** -**Favorites** +**Rating** + +**Developer** + +**Publisher** **Genre** **Players** -**Publisher / Developer** - -**Rating** - -**Kidgame** +**Favorite** **Completed** +**Kidgame** + +**Hidden** _If the "Show hidden games" option is enabled_ + **Broken** -**Hidden** +**Alternative emulator** -With the exception of the game name text filter, all available filter values are assembled from metadata from the actual gamelist, so if there for instance are no games marked as completed, the Completed filter will only have the selectable option False, i.e. True will be missing. +With the exception of the game name text filter, all available filter values are assembled from metadata from the actual gamelist, so if there is no data to filter for the specific field, the text _Nothing to filter_ will be displayed. This for example happens for the _Completed_ filter if there are no games marked as having been completed in the current gamelist. Be aware that although folders can have most of the metadata values set, the filters are only applied to files (this is also true for the game name text filter). So if you for example set a filter to only display your favorite games, any folder that contains a favorite game will be displayed, and other folders which are themselves marked as favorites but that do not contain any favorite games will be hidden. @@ -1672,13 +1688,13 @@ All emulators are RetroArch cores unless marked as **(Standalone**) | System name | Full name | Default emulator | Alternative emulators | Needs BIOS | Recommended game setup | | :-------------------- | :--------------------------------------------- | :-------------------------------- | :-------------------------------- | :----------- | :----------------------------------- | | 3do | 3DO | 4DO | | | | -| 64dd | Nintendo 64DD | Mupen64Plus-Next [UW],
ParaLLEl N64 [M] | ParaLLEl N64 [UW] | | | +| 64dd | Nintendo 64DD | Mupen64Plus-Next [UW],
ParaLLEl N64 [M] | ParaLLEl N64 [UW] | | | | ags | Adventure Game Studio game engine | | | | | | amiga | Commodore Amiga | PUAE | | Yes | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disc, or in separate folder with .m3u playlist if multi-disc | | amiga600 | Commodore Amiga 600 | PUAE | | Yes | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disc, or in separate folder with .m3u playlist if multi-disc | | amiga1200 | Commodore Amiga 1200 | PUAE | | Yes | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disc, or in separate folder with .m3u playlist if multi-disc | | amigacd32 | Commodore Amiga CD32 | PUAE | | | | -| amstradcpc | Amstrad CPC | Caprice32 | | | | +| amstradcpc | Amstrad CPC | Caprice32 | CrocoDS | | | | apple2 | Apple II | | | | | | apple2gs | Apple IIGS | | | | | | arcade | Arcade | MAME - Current | MAME 2000,
MAME 2003-Plus,
MAME 2010,
FinalBurn Neo,
FB Alpha 2012 | Depends | Single archive file following MAME name standard in root folder | @@ -1689,12 +1705,12 @@ All emulators are RetroArch cores unless marked as **(Standalone**) | atari800 | Atari 800 | Atari800 | | | | | atarijaguar | Atari Jaguar | Virtual Jaguar | | | | | atarijaguarcd | Atari Jaguar CD | Virtual Jaguar | | | | -| atarilynx | Atari Lynx | Beetle Lynx | | | | +| atarilynx | Atari Lynx | Handy | Beetle Lynx | | | | atarist | Atari ST [also STE and Falcon] | Hatari | | | | | atarixe | Atari XE | Atari800 | | | | | atomiswave | Atomiswave | Flycast | | | | | bbcmicro | BBC Micro | | | | | -| c64 | Commodore 64 | VICE x64sc Accurate | VICE x64 Fast,
VICE x64 SuperCPU,
VICE x128,
Frodo | No | Single disk, tape r cartridge image in root folder and/or multi-disc images in separate folder | +| c64 | Commodore 64 | VICE x64sc Accurate | VICE x64 Fast,
VICE x64 SuperCPU,
VICE x128,
Frodo | No | Single disk, tape or cartridge image in root folder and/or multi-disc images in separate folder | | cavestory | Cave Story (NXEngine) | NXEngine | | | | | cdtv | Commodore CDTV | | | | | | chailove | ChaiLove game engine | ChaiLove | | | | @@ -1712,51 +1728,51 @@ All emulators are RetroArch cores unless marked as **(Standalone**) | fbneo | FinalBurn Neo | FinalBurn Neo | | Yes | Single archive file following MAME name standard in root folder | | fds | Nintendo Famicom Disk System | Nestopia UE | | Yes | Single archive or ROM file in root folder | | gameandwatch | Nintendo Game and Watch | GW | | | | -| gamegear | Sega Game Gear | Genesis Plus GX | | | | -| gb | Nintendo Game Boy | bsnes | | | | -| gba | Nintendo Game Boy Advance | Beetle GBA | | | | -| gbc | Nintendo Game Boy Color | bsnes | | | | +| gamegear | Sega Game Gear | Gearsystem | SMS Plus GX,
Genesis Plus GX,
Genesis Plus GX Wide | | | +| gb | Nintendo Game Boy | SameBoy | Gambatte,
Gearboy,
TGB Dual,
Mesen-S,
bsnes | | | +| gba | Nintendo Game Boy Advance | mGBA | VBA-M,
VBA Next,
gpSP | | | +| gbc | Nintendo Game Boy Color | SameBoy | Gambatte,
Gearboy,
TGB Dual,
Mesen-S,
bsnes | | | | gc | Nintendo GameCube | Dolphin | | | | | genesis | Sega Genesis | Genesis Plus GX | Genesis Plus GX Wide,
PicoDrive,
BlastEm | No | Single archive or ROM file in root folder | | gx4000 | Amstrad GX4000 | | | | | | intellivision | Mattel Electronics Intellivision | FreeIntv | | | | | kodi | Kodi home theatre software | N/A | | No | | -| lutris | Lutris open gaming platform | Lutris application **(Standalone)** [U] | | No | Shell script in root folder | +| lutris | Lutris open gaming platform | Lutris application **(Standalone)** [U] | | No | Shell script in root folder | | lutro | Lutro game engine | Lutro | | | | | macintosh | Apple Macintosh | | | | | | mame | Multiple Arcade Machine Emulator | MAME 2003-Plus | MAME 2000,
MAME 2010,
MAME - Current,
FinalBurn Neo,
FB Alpha 2012 | Depends | Single archive file following MAME name standard in root folder | | mame-advmame | AdvanceMAME | | | Depends | Single archive file following MAME name standard in root folder | | mame-mame4all | MAME4ALL | | | Depends | Single archive file following MAME name standard in root folder | | mastersystem | Sega Master System | Genesis Plus GX | Genesis Plus GX Wide,
SMS Plus GX,
Gearsystem,
PicoDrive | No | Single archive or ROM file in root folder | -| megacd | Sega Mega-CD | Genesis Plus GX | | | | -| megacdjp | Sega Mega-CD [Japan] | Genesis Plus GX | | | | +| megacd | Sega Mega-CD | Genesis Plus GX | Genesis Plus GX Wide,
PicoDrive | | | +| megacdjp | Sega Mega-CD [Japan] | Genesis Plus GX | Genesis Plus GX Wide,
PicoDrive | | | | megadrive | Sega Mega Drive | Genesis Plus GX | Genesis Plus GX Wide,
PicoDrive,
BlastEm | No | Single archive or ROM file in root folder | | mess | Multi Emulator Super System | MESS 2015 | | | | | moonlight | Moonlight game streaming | | | | | | moto | Thomson MO/TO series | Theodore | | | | -| msx | MSX | blueMSX | | | | -| msx1 | MSX1 | blueMSX | | | | -| msx2 | MSX2 | blueMSX | | | | +| msx | MSX | blueMSX | fMSX | | | +| msx1 | MSX1 | blueMSX | fMSX | | | +| msx2 | MSX2 | blueMSX | fMSX | | | | msxturbor | MSX Turbo R | blueMSX | | | | | multivision | Othello Multivision | Gearsystem | | | | | naomi | Sega NAOMI | Flycast | | | | | naomigd | Sega NAOMI GD-ROM | Flycast | | | | -| n3ds | Nintendo 3DS | Citra | | | | -| n64 | Nintendo 64 | Mupen64Plus-Next [UW],
ParaLLEl N64 [M] | ParaLLEl N64 [UW] | No | Single archive or ROM file in root folder | -| nds | Nintendo DS | melonDS | | | | +| n3ds | Nintendo 3DS | Citra [UW] | Citra 2018 [UW] | | | +| n64 | Nintendo 64 | Mupen64Plus-Next [UW],
ParaLLEl N64 [M] | ParaLLEl N64 [UW] | No | Single archive or ROM file in root folder | +| nds | Nintendo DS | DeSmuME | DeSmuME 2015,
melonDS | | | | neogeo | SNK Neo Geo | FinalBurn Neo | | Yes | Single archive file following MAME name standard in root folder | | neogeocd | SNK Neo Geo CD | NeoCD | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | | neogeocdjp | SNK Neo Geo CD [Japan] | NeoCD | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | -| nes | Nintendo Entertainment System | Nestopia UE | FCEUmm,
Mesen,
QuickNES | No | Single archive or ROM file in root folder | -| ngp | SNK Neo Geo Pocket | Beetle NeoPop | | | | -| ngpc | SNK Neo Geo Pocket Color | Beetle NeoPop | | | | +| nes | Nintendo Entertainment System | Nestopia UE | FCEUmm,
Mesen,
QuickNES | No | Single archive or ROM file in root folder | +| ngp | SNK Neo Geo Pocket | Beetle NeoPop | RACE | | | +| ngpc | SNK Neo Geo Pocket Color | Beetle NeoPop | RACE | | | | odyssey2 | Magnavox Odyssey2 | O2EM | | | | | openbor | OpenBOR game engine | | | | | | oric | Tangerine Computer Systems Oric | | | | | | palm | Palm OS | Mu | | | | -| pc | IBM PC | DOSBox-Core | DOSBox-Pure,
DOSBox-SVN | No | In separate folder (one folder per game, with complete file structure retained) | +| pc | IBM PC | DOSBox-Core | DOSBox-Pure,
DOSBox-SVN | No | In separate folder (one folder per game, with complete file structure retained) | | pc88 | NEC PC-8800 series | QUASI88 | | | | -| pc98 | NEC PC-9800 series | Neko Project II Kai | | | | +| pc98 | NEC PC-9800 series | Neko Project II Kai | Neko Project II | | | | pcengine | NEC PC Engine | Beetle PCE | Beetle PCE FAST | No | Single archive or ROM file in root folder | | pcenginecd | NEC PC Engine CD | Beetle PCE | Beetle PCE FAST | Yes | | | pcfx | NEC PC-FX | Beetle PC-FX | | | | @@ -1770,22 +1786,22 @@ All emulators are RetroArch cores unless marked as **(Standalone**) | psx | Sony PlayStation | Beetle PSX | Beetle PSX HW,
PCSX ReARMed,
DuckStation | Yes | .chd file in root folder for single-disc games, .m3u playlist in root folder for multi-disc games | | residualvm | ResidualVM game engine | | | | | | samcoupe | SAM Coupé | SimCoupe | | | | -| satellaview | Nintendo Satellaview | Snes9x - Current | | | | -| saturn | Sega Saturn | Beetle Saturn | | | | -| saturnjp | Sega Saturn [Japan] | Beetle Saturn | | | | +| satellaview | Nintendo Satellaview | Snes9x - Current | Snes9x 2010,
bsnes,
bsnes-mercury Accuracy,
Mesen-S | | | +| saturn | Sega Saturn | Beetle Saturn | Kronos [UW],
YabaSanshiro [UW],
Yabause | | | +| saturnjp | Sega Saturn [Japan] | Beetle Saturn | Kronos [UW],
YabaSanshiro [UW],
Yabause | | | | scummvm | ScummVM game engine | ScummVM | | No | In separate folder (one folder per game, with complete file structure retained) | | sega32x | Sega Mega Drive 32X | PicoDrive | | No | Single archive or ROM file in root folder | | sega32xjp | Sega Super 32X [Japan] | PicoDrive | | No | Single archive or ROM file in root folder | | sega32xna | Sega Genesis 32X [North America] | PicoDrive | | No | Single archive or ROM file in root folder | -| segacd | Sega CD | Genesis Plus GX | | | | -| sg-1000 | Sega SG-1000 | Genesis Plus GX | | | | +| segacd | Sega CD | Genesis Plus GX | Genesis Plus GX Wide,
PicoDrive | | | +| sg-1000 | Sega SG-1000 | Gearsystem | Genesis Plus GX,
Genesis Plus GX Wide,
blueMSX | | | | snes | Nintendo SNES (Super Nintendo) | Snes9x - Current | Snes9x 2010,
bsnes,
bsnes-mercury Accuracy,
Beetle Supafaust [UW],
Mesen-S | No | Single archive or ROM file in root folder | | snesna | Nintendo SNES (Super Nintendo) [North America] | Snes9x - Current | Snes9x 2010,
bsnes,
bsnes-mercury Accuracy,
Beetle Supafaust [UW],
Mesen-S | No | Single archive or ROM file in root folder | | solarus | Solarus game engine | | | | | | spectravideo | Spectravideo | blueMSX | | | | -| steam | Valve Steam | Steam application **(Standalone)** | | No | Shell script/batch file in root folder | +| steam | Valve Steam | Steam application **(Standalone)** | | No | Shell script/batch file in root folder | | stratagus | Stratagus game engine | | | | | -| sufami | Bandai SuFami Turbo | Snes9x - Current | | | | +| sufami | Bandai SuFami Turbo | Snes9x - Current | Snes9x 2010,
bsnes,
bsnes-mercury Accuracy | | | | supergrafx | NEC SuperGrafx | Beetle SuperGrafx | Beetle PCE | | | | switch | Nintendo Switch | Yuzu **(Standalone)** [UW] | | Yes | | | tanodragon | Tano Dragon | | | | | @@ -1797,7 +1813,7 @@ All emulators are RetroArch cores unless marked as **(Standalone**) | trs-80 | Tandy TRS-80 | | | | | | uzebox | Uzebox | Uzem | | | | | vectrex | Vectrex | vecx | | | | -| videopac | Philips Videopac G7000 (Magnavox Odyssey2) | O2EM | | | | +| videopac | Philips Videopac G7000 | O2EM | | | | | virtualboy | Nintendo Virtual Boy | Beetle VB | | | | | wii | Nintendo Wii | Dolphin | | | | | wiiu | Nintendo Wii U | | | | | @@ -1809,5 +1825,4 @@ All emulators are RetroArch cores unless marked as **(Standalone**) | xbox360 | Microsoft Xbox 360 | | | | | | zmachine | Infocom Z-machine | | | | | | zx81 | Sinclair ZX81 | EightyOne | | | | -| zxspectrum | Sinclair ZX Spectrum | Fuse | | | | | Amstrad GX4000 | | | | | - +| zxspectrum | Sinclair ZX Spectrum | Fuse | | | | diff --git a/USERGUIDE.md b/USERGUIDE.md index 81eada3a2..144d5ba26 100644 --- a/USERGUIDE.md +++ b/USERGUIDE.md @@ -124,6 +124,19 @@ There will be a lot of directories created if using the es_systems.xml file bund _This is the dialog shown if no game files were found. It lets you configure the ROM directory if you don't want to use the default one, and you can also generate the game systems directory structure. Note that the directory is the physical path, and that your operating system may present this as a localized path if you are using a language other than English._ +## Specific notes for macOS + +On macOS, the first time you launch a game from within ES-DE, the operating system will present you with a security option with the following description: + +`"EmulationStation Desktop Edition" would like to access files in your Documents folder.` + +If you don't allow this, you will not be able to place system BIOS ROMs in the RetroArch default system directory `~/Documents/RetroArch/system` even if you've already given RetroArch access to this folder. This is so because RetroArch runs as a subprocess to ES-DE and therefore inherits the security settings from the parent application. Attempting to launch a game without enabling the access will simply display an error message in the emulator that the BIOS files are missing. This of course only applies to emulators that require BIOS ROMs, all other games should work fine regardless of this security setting. + +If you accidentally refused ES-DE the folder access, you can fix this by opening _System Preferences_, selecting _Security & Privacy_ and within the GUI choose _Files and Folders_. The option you need to enable is _Documents Folder_ under _EmulationStation Desktop Edition_. + +Another issue on macOS 11 Big Sur (and possibly other OS versions) is that when connecting a DualShock 4 controller either via Bluetooth or using a USB cable, two separate controller devices are registered in parallel. This is a bug in either macOS or the DualShock driver and it makes it seem as if ES-DE is registering double button presses when actually two separate controller devices are generating identical input. A workaround if using Bluetooth mode is to plug in the USB cable just after connecting the controller, wait a second or two and then remove the cable again. This will remove the cabled device, leaving only the Bluetooth device active. Another workaround is to enable the setting _Only accept input from first controller_ in the ES-DE input device settings. The reason why this bug may not be visible in some other games and applications is that ES-DE enables and auto-configures all connected controllers. + + ## Customizing the systems configuration file The `es_systems.xml` file is located in the ES-DE resources directory which is part of the application installation. As such this file is not intended to be modified directly. If a customized file is needed, this should instead be placed in the `custom_systems` folder in the ES-DE home directory, i.e. `~/.emulationstation/custom_systems/es_systems.xml`. You can find information on the file structure and how to adapt the configuration in the [INSTALL.md](INSTALL.md#es_systemsxml) document. From 081fbc566582c368d10565b291cd8e010faa9510 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 27 Sep 2021 20:59:33 +0200 Subject: [PATCH 20/21] Made an optimization for SVG graphics to avoid a lot of unnecessary re-rasterizations. --- es-core/src/resources/TextureData.cpp | 4 ++-- es-core/src/resources/TextureData.h | 3 +++ es-core/src/resources/TextureResource.cpp | 7 ++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/es-core/src/resources/TextureData.cpp b/es-core/src/resources/TextureData.cpp index 5760111e0..924abd87f 100644 --- a/es-core/src/resources/TextureData.cpp +++ b/es-core/src/resources/TextureData.cpp @@ -72,8 +72,8 @@ bool TextureData::initSVGFromMemory(const std::string& fileData) mSourceHeight = svgImage->height; } - mWidth = static_cast(std::round(mSourceWidth * mScaleDuringLoad)); - mHeight = static_cast(std::round(mSourceHeight * mScaleDuringLoad)); + mWidth = static_cast(floorf(floorf(mSourceWidth) * mScaleDuringLoad)); + mHeight = static_cast(floorf(floorf(mSourceHeight) * mScaleDuringLoad)); if (mWidth == 0) { // Auto scale width to keep aspect ratio. diff --git a/es-core/src/resources/TextureData.h b/es-core/src/resources/TextureData.h index ebb27b3e8..c50cd19d3 100644 --- a/es-core/src/resources/TextureData.h +++ b/es-core/src/resources/TextureData.h @@ -9,6 +9,8 @@ #ifndef ES_CORE_RESOURCES_TEXTURE_DATA_H #define ES_CORE_RESOURCES_TEXTURE_DATA_H +#include "utils/MathUtil.h" + #include #include #include @@ -53,6 +55,7 @@ public: float sourceWidth(); float sourceHeight(); void setSourceSize(float width, float height); + glm::vec2 getSize() { return glm::vec2{mWidth, mHeight}; } // Define a factor for scaling the file when loading it (1.0f = no scaling). void setScaleDuringLoad(float scale) { mScaleDuringLoad = scale; } diff --git a/es-core/src/resources/TextureResource.cpp b/es-core/src/resources/TextureResource.cpp index 33fec7e8a..74e5d5bfe 100644 --- a/es-core/src/resources/TextureResource.cpp +++ b/es-core/src/resources/TextureResource.cpp @@ -194,9 +194,14 @@ std::shared_ptr TextureResource::get(const std::string& path, return tex; } -// For scalable source images in textures we want to set the resolution to rasterize at. void TextureResource::rasterizeAt(size_t width, size_t height) { + if (mTextureData != nullptr) { + glm::vec2 textureSize = mTextureData.get()->getSize(); + if (textureSize.x == width && textureSize.y == height) + return; + } + std::shared_ptr data; if (mTextureData != nullptr) data = mTextureData; From 87d6207c51eb673466e0fbd46d9b572adcd95bb5 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 27 Sep 2021 21:03:53 +0200 Subject: [PATCH 21/21] Removed lots of unnecessary help component texture resizing. --- es-core/src/components/HelpComponent.cpp | 2 +- es-core/src/components/ImageComponent.cpp | 5 +++-- es-core/src/components/ImageComponent.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/es-core/src/components/HelpComponent.cpp b/es-core/src/components/HelpComponent.cpp index 69c1ae32c..7b6c7197f 100644 --- a/es-core/src/components/HelpComponent.cpp +++ b/es-core/src/components/HelpComponent.cpp @@ -218,7 +218,7 @@ void HelpComponent::updateGrid() for (auto it = mPrompts.cbegin(); it != mPrompts.cend(); it++) { auto icon = std::make_shared(mWindow); - icon->setImage(getIconTexture(it->first.c_str())); + icon->setImage(getIconTexture(it->first.c_str()), false); icon->setColorShift(isDimmed ? mStyle.iconColorDimmed : mStyle.iconColor); icon->setResize(0, height); icons.push_back(icon); diff --git a/es-core/src/components/ImageComponent.cpp b/es-core/src/components/ImageComponent.cpp index 600af7c22..f6c2d2af2 100644 --- a/es-core/src/components/ImageComponent.cpp +++ b/es-core/src/components/ImageComponent.cpp @@ -170,10 +170,11 @@ void ImageComponent::setImage(const char* data, size_t length, bool tile) resize(); } -void ImageComponent::setImage(const std::shared_ptr& texture) +void ImageComponent::setImage(const std::shared_ptr& texture, bool resizeTexture) { mTexture = texture; - resize(); + if (resizeTexture) + resize(); } void ImageComponent::setResize(float width, float height) diff --git a/es-core/src/components/ImageComponent.h b/es-core/src/components/ImageComponent.h index ca537c62f..159d65e3b 100644 --- a/es-core/src/components/ImageComponent.h +++ b/es-core/src/components/ImageComponent.h @@ -28,7 +28,7 @@ public: // Loads an image from memory. void setImage(const char* data, size_t length, bool tile = false); // Use an already existing texture. - void setImage(const std::shared_ptr& texture); + void setImage(const std::shared_ptr& texture, bool resizeTexture = true); void onSizeChanged() override { updateVertices(); }