From 58fd5b8f101b52b99653028100502beabb9b43fc Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 4 Sep 2021 21:47:42 +0200 Subject: [PATCH 01/64] Fixed an issue with the help prompts text color when the menu was opened. --- es-core/src/HelpStyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/es-core/src/HelpStyle.cpp b/es-core/src/HelpStyle.cpp index b351906f7..5c0f069f1 100644 --- a/es-core/src/HelpStyle.cpp +++ b/es-core/src/HelpStyle.cpp @@ -49,12 +49,16 @@ void HelpStyle::applyTheme(const std::shared_ptr& theme, const std::s if (elem->has("textColorDimmed")) textColorDimmed = elem->get("textColorDimmed"); + else + textColorDimmed = textColor; if (elem->has("iconColor")) iconColor = elem->get("iconColor"); if (elem->has("iconColorDimmed")) iconColorDimmed = elem->get("iconColorDimmed"); + else + iconColorDimmed = iconColor; if (elem->has("fontPath") || elem->has("fontSize")) font = Font::getFromTheme(elem, ThemeFlags::ALL, font); From ca0e111c21e009ff170abe4dd26501cbfa70fb22 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 4 Sep 2021 22:00:04 +0200 Subject: [PATCH 02/64] Small documentation update. --- CHANGELOG.md | 1 + THEMES-DEV.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a762ca9..9e1258a52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * 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 * 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 * Removed the "Choose" entry from the help prompts in the gamelist view * Changed the "Toggle screensaver" help entry in the system view to simply "Screensaver" * Added support for upscaling bitmap images using linear filtering diff --git a/THEMES-DEV.md b/THEMES-DEV.md index 79af9725c..8999bee1b 100644 --- a/THEMES-DEV.md +++ b/THEMES-DEV.md @@ -864,9 +864,9 @@ EmulationStation borrows the concept of "nine patches" from Android (or "9-Slice - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. * `textColor` - type: COLOR. Default is 777777FF. -* `textColorDimmed` - type: COLOR. Default is 777777FF. +* `textColorDimmed` - type: COLOR. Default is the same value as textColor. * `iconColor` - type: COLOR. Default is 777777FF. -* `iconColorDimmed` - type: COLOR. Default is 777777FF. +* `iconColorDimmed` - type: COLOR. Default is the same value as iconColor. * `fontPath` - type: PATH. * `fontSize` - type: FLOAT. * `entrySpacing` - type: FLOAT. Default is 16.0. From b04825976e17407655fbe42af35a8fc543045eed Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 4 Sep 2021 23:27:43 +0200 Subject: [PATCH 03/64] (rbsimple-DE) Adjusted the help prompts colors. --- themes/rbsimple-DE/colors.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/rbsimple-DE/colors.xml b/themes/rbsimple-DE/colors.xml index 4fa1d5782..710ee41ec 100644 --- a/themes/rbsimple-DE/colors.xml +++ b/themes/rbsimple-DE/colors.xml @@ -22,8 +22,10 @@ 262626 - A6A6A6 - A6A6A6 + C6C6C6 + C6C6C6 + B6B6B6 + B6B6B6 From 1ad55cdcec114c7a506bf5964ebfe73cbcdaf928 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 5 Sep 2021 17:29:51 +0200 Subject: [PATCH 04/64] Two small cosmetic changes related to the alternative emulators logic. --- es-app/src/FileData.cpp | 3 ++- es-app/src/guis/GuiAlternativeEmulators.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 81697d936..897992cbf 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -761,7 +761,8 @@ void FileData::launchGame(Window* window) } else { LOG(LogDebug) << "FileData::launchGame(): Using alternative emulator \"" - << metadata.get("altemulator") << "\" as configured for the game"; + << metadata.get("altemulator") + << "\" as configured for the specific game"; } } diff --git a/es-app/src/guis/GuiAlternativeEmulators.cpp b/es-app/src/guis/GuiAlternativeEmulators.cpp index a3fcd0e59..3b36d1972 100644 --- a/es-app/src/guis/GuiAlternativeEmulators.cpp +++ b/es-app/src/guis/GuiAlternativeEmulators.cpp @@ -95,7 +95,7 @@ GuiAlternativeEmulators::GuiAlternativeEmulators(Window* window) row.addElement(labelText, false); row.makeAcceptInputHandler([this, it, labelText] { - if (labelText->getValue() == "") + if (labelText->getValue() == "") return; selectorWindow(*it); }); @@ -175,7 +175,7 @@ void GuiAlternativeEmulators::selectorWindow(SystemData* system) if (entry.second == system->getSystemEnvData()->mLaunchCommands.front().second) { if (system->getSystemEnvData()->mLaunchCommands.front().second == "") { - updateMenu(system->getName(), "", + updateMenu(system->getName(), "", (entry.second == system->getSystemEnvData()->mLaunchCommands.front().second)); } From 8a51919f31f1a377efb8d8a09ee807e558531fec Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 5 Sep 2021 17:39:11 +0200 Subject: [PATCH 05/64] Added the ability to make complementary game systems customizations. --- es-app/src/CollectionSystemsManager.cpp | 42 +- es-app/src/SystemData.cpp | 677 +++++++++++++----------- es-app/src/SystemData.h | 4 +- 3 files changed, 401 insertions(+), 322 deletions(-) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index 684d609ee..54ca1e33a 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -1320,33 +1320,41 @@ void CollectionSystemsManager::addEnabledCollectionsToDisplayedSystems( std::vector CollectionSystemsManager::getSystemsFromConfig() { std::vector systems; - std::string path = SystemData::getConfigPath(false); + std::vector configPaths = SystemData::getConfigPath(false); - if (!Utils::FileSystem::exists(path)) - return systems; + // Here we don't honor the tag which may be present in the custom es_systems.xml + // file under ~/.emulationstation/custom_systems as we really want to include all the themes + // supported by ES-DE. Otherwise a user may accidentally create a custom collection that + // corresponds to a supported theme. + for (auto path : configPaths) { + if (!Utils::FileSystem::exists(path)) + return systems; - pugi::xml_document doc; + pugi::xml_document doc; #if defined(_WIN64) - pugi::xml_parse_result res = doc.load_file(Utils::String::stringToWideString(path).c_str()); + pugi::xml_parse_result res = doc.load_file(Utils::String::stringToWideString(path).c_str()); #else - pugi::xml_parse_result res = doc.load_file(path.c_str()); + pugi::xml_parse_result res = doc.load_file(path.c_str()); #endif - if (!res) - return systems; + if (!res) + return systems; - // Actually read the file. - pugi::xml_node systemList = doc.child("systemList"); + // Actually read the file. + pugi::xml_node systemList = doc.child("systemList"); - if (!systemList) - return systems; + if (!systemList) + return systems; - for (pugi::xml_node system = systemList.child("system"); system; - system = system.next_sibling("system")) { - // Theme folder. - std::string themeFolder = system.child("theme").text().get(); - systems.push_back(themeFolder); + for (pugi::xml_node system = systemList.child("system"); system; + system = system.next_sibling("system")) { + // Theme folder. + std::string themeFolder = system.child("theme").text().get(); + if (std::find(systems.cbegin(), systems.cend(), themeFolder) == systems.cend()) + systems.push_back(themeFolder); + } } + std::sort(systems.begin(), systems.end()); return systems; } diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 431ebbaac..b91ed7e73 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -387,219 +387,245 @@ bool SystemData::loadConfig() LOG(LogInfo) << "Populating game systems..."; - std::string path = getConfigPath(true); + std::vector configPaths = getConfigPath(true); const std::string rompath = FileData::getROMDirectory(); - LOG(LogInfo) << "Parsing systems configuration file \"" << path << "\"..."; + bool onlyProcessCustomFile = false; - pugi::xml_document doc; + for (auto path : configPaths) { + // If the loadExclusive tag is present in the custom es_systems.xml file, then skip + // processing of the bundled configuration file. + if (onlyProcessCustomFile) + break; + + LOG(LogInfo) << "Parsing systems configuration file \"" << path << "\"..."; + + pugi::xml_document doc; #if defined(_WIN64) - pugi::xml_parse_result res = doc.load_file(Utils::String::stringToWideString(path).c_str()); + pugi::xml_parse_result res = doc.load_file(Utils::String::stringToWideString(path).c_str()); #else - pugi::xml_parse_result res = doc.load_file(path.c_str()); + pugi::xml_parse_result res = doc.load_file(path.c_str()); #endif - if (!res) { - LOG(LogError) << "Couldn't parse es_systems.xml: " << res.description(); - return true; - } + if (!res) { + LOG(LogError) << "Couldn't parse es_systems.xml: " << res.description(); + return true; + } - // Actually read the file. - pugi::xml_node systemList = doc.child("systemList"); - - if (!systemList) { - LOG(LogError) << "es_systems.xml is missing the tag"; - return true; - } - - for (pugi::xml_node system = systemList.child("system"); system; - system = system.next_sibling("system")) { - std::string name; - std::string fullname; - std::string path; - std::string themeFolder; - - name = system.child("name").text().get(); - fullname = system.child("fullname").text().get(); - path = system.child("path").text().get(); - - auto nameFindFunc = [&] { - for (auto system : sSystemVector) { - if (system->mName == name) { - LOG(LogWarning) << "A system with the name \"" << name - << "\" has already been loaded, skipping duplicate entry"; - return true; - } + pugi::xml_node loadExclusive = doc.child("loadExclusive"); + if (loadExclusive) { + if (path == configPaths.front() && configPaths.size() > 1) { + LOG(LogInfo) << "Only loading custom file as the tag is present"; + onlyProcessCustomFile = true; } - return false; - }; + else { + LOG(LogWarning) << "A tag is present in the bundled es_systems.xml " + "file, ignoring it as this is only supposed to be used for the " + "custom es_systems.xml file"; + } + } - // If the name is matching a system that has already been loaded, then skip the entry. - if (nameFindFunc()) - continue; + // Actually read the file. + pugi::xml_node systemList = doc.child("systemList"); - // If there is a %ROMPATH% variable set for the system, expand it. By doing this - // it's possible to use either absolute ROM paths in es_systems.xml or to utilize - // the ROM path configured as ROMDirectory in es_settings.xml. If it's set to "" - // in this configuration file, the default hardcoded path $HOME/ROMs/ will be used. - path = Utils::String::replace(path, "%ROMPATH%", rompath); + if (!systemList) { + LOG(LogError) << "es_systems.xml is missing the tag"; + return true; + } + + for (pugi::xml_node system = systemList.child("system"); system; + system = system.next_sibling("system")) { + std::string name; + std::string fullname; + std::string path; + std::string themeFolder; + + name = system.child("name").text().get(); + fullname = system.child("fullname").text().get(); + path = system.child("path").text().get(); + + auto nameFindFunc = [&] { + for (auto system : sSystemVector) { + if (system->mName == name) { + LOG(LogWarning) << "A system with the name \"" << name + << "\" has already been loaded, skipping duplicate entry"; + return true; + } + } + return false; + }; + + // If the name is matching a system that has already been loaded, then skip the entry. + if (nameFindFunc()) + continue; + + // If there is a %ROMPATH% variable set for the system, expand it. By doing this + // it's possible to use either absolute ROM paths in es_systems.xml or to utilize + // the ROM path configured as ROMDirectory in es_settings.xml. If it's set to "" + // in this configuration file, the default hardcoded path $HOME/ROMs/ will be used. + path = Utils::String::replace(path, "%ROMPATH%", rompath); #if defined(_WIN64) - path = Utils::String::replace(path, "\\", "/"); + path = Utils::String::replace(path, "\\", "/"); #endif - path = Utils::String::replace(path, "//", "/"); + path = Utils::String::replace(path, "//", "/"); - // Check that the ROM directory for the system is valid or otherwise abort the processing. - if (!Utils::FileSystem::exists(path)) { - LOG(LogDebug) << "SystemData::loadConfig(): Skipping system \"" << name - << "\" as the defined ROM directory \"" << path << "\" does not exist"; - continue; - } - if (!Utils::FileSystem::isDirectory(path)) { - LOG(LogDebug) << "SystemData::loadConfig(): Skipping system \"" << name - << "\" as the defined ROM directory \"" << path - << "\" is not actually a directory"; - continue; - } - if (Utils::FileSystem::isSymlink(path)) { - // Make sure that the symlink is not pointing to somewhere higher in the hierarchy - // as that would lead to an infite loop, meaning the application would never start. - std::string resolvedRompath = Utils::FileSystem::getCanonicalPath(rompath); - if (resolvedRompath.find(Utils::FileSystem::getCanonicalPath(path)) == 0) { - LOG(LogWarning) << "Skipping system \"" << name - << "\" as the defined ROM directory \"" << path - << "\" is an infinitely recursive symlink"; + // Check that the ROM directory for the system is valid or otherwise abort the + // processing. + if (!Utils::FileSystem::exists(path)) { + LOG(LogDebug) << "SystemData::loadConfig(): Skipping system \"" << name + << "\" as the defined ROM directory \"" << path + << "\" does not exist"; continue; } - } + if (!Utils::FileSystem::isDirectory(path)) { + LOG(LogDebug) << "SystemData::loadConfig(): Skipping system \"" << name + << "\" as the defined ROM directory \"" << path + << "\" is not actually a directory"; + continue; + } + if (Utils::FileSystem::isSymlink(path)) { + // Make sure that the symlink is not pointing to somewhere higher in the hierarchy + // as that would lead to an infite loop, meaning the application would never start. + std::string resolvedRompath = Utils::FileSystem::getCanonicalPath(rompath); + if (resolvedRompath.find(Utils::FileSystem::getCanonicalPath(path)) == 0) { + LOG(LogWarning) + << "Skipping system \"" << name << "\" as the defined ROM directory \"" + << path << "\" is an infinitely recursive symlink"; + continue; + } + } - // Convert extensions list from a string into a vector of strings. - std::vector extensions = readList(system.child("extension").text().get()); + // Convert extensions list from a string into a vector of strings. + std::vector extensions = readList(system.child("extension").text().get()); - // Load all launch command tags for the system and if there are multiple tags, then - // the label attribute needs to be set on all entries as it's a requirement for the - // alternative emulator logic. - std::vector> commands; - for (pugi::xml_node entry = system.child("command"); entry; - entry = entry.next_sibling("command")) { - if (!entry.attribute("label")) { - if (commands.size() == 1) { - // The first command tag had a label but the second one doesn't. + // Load all launch command tags for the system and if there are multiple tags, then + // the label attribute needs to be set on all entries as it's a requirement for the + // alternative emulator logic. + std::vector> commands; + for (pugi::xml_node entry = system.child("command"); entry; + entry = entry.next_sibling("command")) { + if (!entry.attribute("label")) { + if (commands.size() == 1) { + // The first command tag had a label but the second one doesn't. + LOG(LogError) + << "Missing mandatory label attribute for alternative emulator " + "entry, only the first command tag will be processed for system \"" + << name << "\""; + break; + } + else if (commands.size() > 1) { + // At least two command tags had a label but this one doesn't. + LOG(LogError) + << "Missing mandatory label attribute for alternative emulator " + "entry, no additional command tags will be processed for system \"" + << name << "\""; + break; + } + } + else if (!commands.empty() && commands.back().second == "") { + // There are more than one command tags and the first tag did not have a label. LOG(LogError) << "Missing mandatory label attribute for alternative emulator " "entry, only the first command tag will be processed for system \"" << name << "\""; break; } - else if (commands.size() > 1) { - // At least two command tags had a label but this one doesn't. - LOG(LogError) - << "Missing mandatory label attribute for alternative emulator " - "entry, no additional command tags will be processed for system \"" - << name << "\""; + commands.push_back( + std::make_pair(entry.text().get(), entry.attribute("label").as_string())); + } + + // Platform ID list + const std::string platformList = + Utils::String::toLower(system.child("platform").text().get()); + + if (platformList == "") { + LOG(LogWarning) << "No platform defined for system \"" << name + << "\", scraper searches will be inaccurate"; + } + + std::vector platformStrs = readList(platformList); + std::vector platformIds; + for (auto it = platformStrs.cbegin(); it != platformStrs.cend(); it++) { + std::string str = *it; + PlatformIds::PlatformId platformId = PlatformIds::getPlatformId(str); + + if (platformId == PlatformIds::PLATFORM_IGNORE) { + // When platform is PLATFORM_IGNORE, do not allow other platforms. + platformIds.clear(); + platformIds.push_back(platformId); break; } - } - else if (!commands.empty() && commands.back().second == "") { - // There are more than one command tags and the first tag did not have a label. - LOG(LogError) << "Missing mandatory label attribute for alternative emulator " - "entry, only the first command tag will be processed for system \"" - << name << "\""; - break; - } - commands.push_back( - std::make_pair(entry.text().get(), entry.attribute("label").as_string())); - } - // Platform ID list - const std::string platformList = - Utils::String::toLower(system.child("platform").text().get()); - - if (platformList == "") { - LOG(LogWarning) << "No platform defined for system \"" << name - << "\", scraper searches will be inaccurate"; - } - - std::vector platformStrs = readList(platformList); - std::vector platformIds; - for (auto it = platformStrs.cbegin(); it != platformStrs.cend(); it++) { - std::string str = *it; - PlatformIds::PlatformId platformId = PlatformIds::getPlatformId(str); - - if (platformId == PlatformIds::PLATFORM_IGNORE) { - // When platform is PLATFORM_IGNORE, do not allow other platforms. - platformIds.clear(); - platformIds.push_back(platformId); - break; + // If there's a platform entry defined but it does not match the list of supported + // platforms, then generate a warning. + if (str != "" && platformId == PlatformIds::PLATFORM_UNKNOWN) + LOG(LogWarning) << "Unknown platform \"" << str << "\" defined for system \"" + << name << "\", scraper searches will be inaccurate"; + else if (platformId != PlatformIds::PLATFORM_UNKNOWN) + platformIds.push_back(platformId); } - // If there's a platform entry defined but it does not match the list of supported - // platforms, then generate a warning. - if (str != "" && platformId == PlatformIds::PLATFORM_UNKNOWN) - LOG(LogWarning) << "Unknown platform \"" << str << "\" defined for system \"" - << name << "\", scraper searches will be inaccurate"; - else if (platformId != PlatformIds::PLATFORM_UNKNOWN) - platformIds.push_back(platformId); - } + // Theme folder. + themeFolder = system.child("theme").text().as_string(name.c_str()); - // Theme folder. - themeFolder = system.child("theme").text().as_string(name.c_str()); + // Validate. - // Validate. + if (name.empty()) { + LOG(LogError) + << "A system in the es_systems.xml file has no name defined, skipping entry"; + continue; + } + else if (fullname.empty() || path.empty() || extensions.empty() || commands.empty()) { + LOG(LogError) << "System \"" << name + << "\" is missing the fullname, path, " + "extension, or command tag, skipping entry"; + continue; + } - if (name.empty()) { - LOG(LogError) - << "A system in the es_systems.xml file has no name defined, skipping entry"; - continue; - } - else if (fullname.empty() || path.empty() || extensions.empty() || commands.empty()) { - LOG(LogError) << "System \"" << name - << "\" is missing the fullname, path, " - "extension, or command tag, skipping entry"; - continue; - } - - // Convert path to generic directory seperators. - path = Utils::FileSystem::getGenericPath(path); + // Convert path to generic directory seperators. + path = Utils::FileSystem::getGenericPath(path); #if defined(_WIN64) - if (!Settings::getInstance()->getBool("ShowHiddenFiles") && - Utils::FileSystem::isHidden(path)) { - LOG(LogWarning) << "Skipping hidden ROM folder \"" << path << "\""; - continue; - } + if (!Settings::getInstance()->getBool("ShowHiddenFiles") && + Utils::FileSystem::isHidden(path)) { + LOG(LogWarning) << "Skipping hidden ROM folder \"" << path << "\""; + continue; + } #endif - // Create the system runtime environment data. - SystemEnvironmentData* envData = new SystemEnvironmentData; - envData->mStartPath = path; - envData->mSearchExtensions = extensions; - envData->mLaunchCommands = commands; - envData->mPlatformIds = platformIds; + // Create the system runtime environment data. + SystemEnvironmentData* envData = new SystemEnvironmentData; + envData->mStartPath = path; + envData->mSearchExtensions = extensions; + envData->mLaunchCommands = commands; + envData->mPlatformIds = platformIds; - SystemData* newSys = new SystemData(name, fullname, envData, themeFolder); - bool onlyHidden = false; + SystemData* newSys = new SystemData(name, fullname, envData, themeFolder); + bool onlyHidden = false; - // If the option to show hidden games has been disabled, then check whether all - // games for the system are hidden. That will flag the system as empty. - if (!Settings::getInstance()->getBool("ShowHiddenGames")) { - std::vector recursiveGames = newSys->getRootFolder()->getChildrenRecursive(); - onlyHidden = true; - for (auto it = recursiveGames.cbegin(); it != recursiveGames.cend(); it++) { - if ((*it)->getType() != FOLDER) { - onlyHidden = (*it)->getHidden(); - if (!onlyHidden) - break; + // If the option to show hidden games has been disabled, then check whether all + // games for the system are hidden. That will flag the system as empty. + if (!Settings::getInstance()->getBool("ShowHiddenGames")) { + std::vector recursiveGames = + newSys->getRootFolder()->getChildrenRecursive(); + onlyHidden = true; + for (auto it = recursiveGames.cbegin(); it != recursiveGames.cend(); it++) { + if ((*it)->getType() != FOLDER) { + onlyHidden = (*it)->getHidden(); + if (!onlyHidden) + break; + } } } - } - if (newSys->getRootFolder()->getChildrenByFilename().size() == 0 || onlyHidden) { - LOG(LogDebug) << "SystemData::loadConfig(): Skipping system \"" << name - << "\" as no files matched any of the defined file extensions"; - delete newSys; - } - else { - sSystemVector.push_back(newSys); + if (newSys->getRootFolder()->getChildrenByFilename().size() == 0 || onlyHidden) { + LOG(LogDebug) << "SystemData::loadConfig(): Skipping system \"" << name + << "\" as no files matched any of the defined file extensions"; + delete newSys; + } + else { + sSystemVector.push_back(newSys); + } } } @@ -634,8 +660,10 @@ void SystemData::deleteSystems() sSystemVector.clear(); } -std::string SystemData::getConfigPath(bool legacyWarning) +std::vector SystemData::getConfigPath(bool legacyWarning) { + std::vector paths; + if (legacyWarning) { std::string legacyConfigFile = Utils::FileSystem::getHomePath() + "/.emulationstation/es_systems.cfg"; @@ -662,7 +690,7 @@ std::string SystemData::getConfigPath(bool legacyWarning) if (Utils::FileSystem::exists(path)) { LOG(LogInfo) << "Found custom systems configuration file"; - return path; + paths.push_back(path); } #if defined(_WIN64) @@ -674,18 +702,16 @@ std::string SystemData::getConfigPath(bool legacyWarning) path = ResourceManager::getInstance()->getResourcePath(":/systems/unix/es_systems.xml", true); #endif - return path; + paths.push_back(path); + return paths; } bool SystemData::createSystemDirectories() { - std::string path = getConfigPath(false); + std::vector configPaths = getConfigPath(true); const std::string rompath = FileData::getROMDirectory(); - if (!Utils::FileSystem::exists(path)) { - LOG(LogInfo) << "Systems configuration file does not exist, aborting"; - return true; - } + bool onlyProcessCustomFile = false; LOG(LogInfo) << "Generating ROM directory structure..."; @@ -706,144 +732,187 @@ bool SystemData::createSystemDirectories() LOG(LogInfo) << "Base ROM directory \"" << rompath << "\" already exists"; } - LOG(LogInfo) << "Parsing systems configuration file \"" << path << "\"..."; - - pugi::xml_document doc; + if (configPaths.size() > 1) { + // If the loadExclusive tag is present in the custom es_systems.xml file, then skip + // processing of the bundled configuration file. + pugi::xml_document doc; #if defined(_WIN64) - pugi::xml_parse_result res = doc.load_file(Utils::String::stringToWideString(path).c_str()); + pugi::xml_parse_result res = + doc.load_file(Utils::String::stringToWideString(configPath).c_str()); #else - pugi::xml_parse_result res = doc.load_file(path.c_str()); + pugi::xml_parse_result res = doc.load_file(configPaths.front().c_str()); #endif - - if (!res) { - LOG(LogError) << "Couldn't parse es_systems.xml"; - LOG(LogError) << res.description(); - return true; - } - - // Actually read the file. - pugi::xml_node systemList = doc.child("systemList"); - - if (!systemList) { - LOG(LogError) << "es_systems.xml is missing the tag"; - return true; - } - - std::vector systemsVector; - - for (pugi::xml_node system = systemList.child("system"); system; - system = system.next_sibling("system")) { - std::string systemDir; - std::string name; - std::string fullname; - std::string path; - std::string extensions; - std::vector commands; - std::string platform; - std::string themeFolder; - const std::string systemInfoFileName = "/systeminfo.txt"; - bool replaceInfoFile = false; - std::ofstream systemInfoFile; - - name = system.child("name").text().get(); - fullname = system.child("fullname").text().get(); - path = system.child("path").text().get(); - extensions = system.child("extension").text().get(); - for (pugi::xml_node entry = system.child("command"); entry; - entry = entry.next_sibling("command")) { - commands.push_back(entry.text().get()); + if (res) { + pugi::xml_node loadExclusive = doc.child("loadExclusive"); + if (loadExclusive) + onlyProcessCustomFile = true; } - platform = Utils::String::toLower(system.child("platform").text().get()); - themeFolder = system.child("theme").text().as_string(name.c_str()); + } - // Check that the %ROMPATH% variable is actually used for the path element. - // If not, skip the system. - if (path.find("%ROMPATH%") != 0) { - LOG(LogWarning) << "The path element for system \"" << name - << "\" does not " - "utilize the %ROMPATH% variable, skipping entry"; + // Process the custom es_systems.xml file after the bundled file, as any systems with identical + // tags will be overwritten by the last occurrence. + std::reverse(configPaths.begin(), configPaths.end()); + + std::vector> systemsVector; + + for (auto configPath : configPaths) { + // If the loadExclusive tag is present. + if (onlyProcessCustomFile && configPath == configPaths.front()) continue; - } - else { - systemDir = path.substr(9, path.size() - 9); - } - // Trim any leading directory separator characters. - systemDir.erase(systemDir.begin(), - std::find_if(systemDir.begin(), systemDir.end(), - [](char c) { return c != '/' && c != '\\'; })); - - if (!Utils::FileSystem::exists(rompath + systemDir)) { - if (!Utils::FileSystem::createDirectory(rompath + systemDir)) { - LOG(LogError) << "Couldn't create system directory \"" << systemDir - << "\", permission problems or disk full?"; - return true; - } - else { - LOG(LogInfo) << "Created system directory \"" << systemDir << "\""; - } - } - else { - LOG(LogInfo) << "System directory \"" << systemDir << "\" already exists"; - } - - if (Utils::FileSystem::exists(rompath + systemDir + systemInfoFileName)) - replaceInfoFile = true; - else - replaceInfoFile = false; - - if (replaceInfoFile) { - if (Utils::FileSystem::removeFile(rompath + systemDir + systemInfoFileName)) - return true; - } + LOG(LogInfo) << "Parsing systems configuration file \"" << configPath << "\"..."; + pugi::xml_document doc; #if defined(_WIN64) - systemInfoFile.open( - Utils::String::stringToWideString(rompath + systemDir + systemInfoFileName).c_str()); + pugi::xml_parse_result res = + doc.load_file(Utils::String::stringToWideString(configPath).c_str()); #else - systemInfoFile.open(rompath + systemDir + systemInfoFileName); + pugi::xml_parse_result res = doc.load_file(configPath.c_str()); #endif - if (systemInfoFile.fail()) { - LOG(LogError) << "Couldn't create system information file \"" - << rompath + systemDir + systemInfoFileName - << "\", permission problems or disk full?"; - systemInfoFile.close(); + if (!res) { + LOG(LogError) << "Couldn't parse es_systems.xml"; + LOG(LogError) << res.description(); return true; } - systemInfoFile << "System name:" << std::endl; - systemInfoFile << name << std::endl << std::endl; - systemInfoFile << "Full system name:" << std::endl; - systemInfoFile << fullname << std::endl << std::endl; - systemInfoFile << "Supported file extensions:" << std::endl; - systemInfoFile << extensions << std::endl << std::endl; - systemInfoFile << "Launch command:" << std::endl; - systemInfoFile << commands.front() << std::endl << std::endl; - // Alternative emulator configuration entries. - if (commands.size() > 1) { - systemInfoFile << (commands.size() == 2 ? "Alternative launch command:" : - "Alternative launch commands:") - << std::endl; - for (auto it = commands.cbegin() + 1; it != commands.cend(); it++) - systemInfoFile << (*it) << std::endl; - systemInfoFile << std::endl; - } - systemInfoFile << "Platform (for scraping):" << std::endl; - systemInfoFile << platform << std::endl << std::endl; - systemInfoFile << "Theme folder:" << std::endl; - systemInfoFile << themeFolder << std::endl; - systemInfoFile.close(); + // Actually read the file. + pugi::xml_node systemList = doc.child("systemList"); - systemsVector.push_back(systemDir + ": " + fullname); - - if (replaceInfoFile) { - LOG(LogInfo) << "Replaced existing system information file \"" - << rompath + systemDir + systemInfoFileName << "\""; + if (!systemList) { + LOG(LogError) << "es_systems.xml is missing the tag"; + return true; } - else { - LOG(LogInfo) << "Created system information file \"" - << rompath + systemDir + systemInfoFileName << "\""; + + for (pugi::xml_node system = systemList.child("system"); system; + system = system.next_sibling("system")) { + std::string systemDir; + std::string name; + std::string fullname; + std::string path; + std::string extensions; + std::vector commands; + std::string platform; + std::string themeFolder; + const std::string systemInfoFileName = "/systeminfo.txt"; + bool replaceInfoFile = false; + std::ofstream systemInfoFile; + + name = system.child("name").text().get(); + fullname = system.child("fullname").text().get(); + path = system.child("path").text().get(); + extensions = system.child("extension").text().get(); + for (pugi::xml_node entry = system.child("command"); entry; + entry = entry.next_sibling("command")) { + commands.push_back(entry.text().get()); + } + platform = Utils::String::toLower(system.child("platform").text().get()); + themeFolder = system.child("theme").text().as_string(name.c_str()); + + // Check that the %ROMPATH% variable is actually used for the path element. + // If not, skip the system. + if (path.find("%ROMPATH%") != 0) { + LOG(LogWarning) << "The path element for system \"" << name + << "\" does not " + "utilize the %ROMPATH% variable, skipping entry"; + continue; + } + else { + systemDir = path.substr(9, path.size() - 9); + } + + // Trim any leading directory separator characters. + systemDir.erase(systemDir.begin(), + std::find_if(systemDir.begin(), systemDir.end(), + [](char c) { return c != '/' && c != '\\'; })); + + if (!Utils::FileSystem::exists(rompath + systemDir)) { + if (!Utils::FileSystem::createDirectory(rompath + systemDir)) { + LOG(LogError) << "Couldn't create system directory \"" << systemDir + << "\", permission problems or disk full?"; + return true; + } + else { + LOG(LogInfo) << "Created system directory \"" << systemDir << "\""; + } + } + else { + LOG(LogInfo) << "System directory \"" << systemDir << "\" already exists"; + } + + if (Utils::FileSystem::exists(rompath + systemDir + systemInfoFileName)) + replaceInfoFile = true; + else + replaceInfoFile = false; + + if (replaceInfoFile) { + if (Utils::FileSystem::removeFile(rompath + systemDir + systemInfoFileName)) + return true; + } + +#if defined(_WIN64) + systemInfoFile.open( + Utils::String::stringToWideString(rompath + systemDir + systemInfoFileName) + .c_str()); +#else + systemInfoFile.open(rompath + systemDir + systemInfoFileName); +#endif + + if (systemInfoFile.fail()) { + LOG(LogError) << "Couldn't create system information file \"" + << rompath + systemDir + systemInfoFileName + << "\", permission problems or disk full?"; + systemInfoFile.close(); + return true; + } + + systemInfoFile << "System name:" << std::endl; + if (configPaths.size() != 1 && configPath == configPaths.back()) + systemInfoFile << name << " (custom system)" << std::endl << std::endl; + else + systemInfoFile << name << std::endl << std::endl; + systemInfoFile << "Full system name:" << std::endl; + systemInfoFile << fullname << std::endl << std::endl; + systemInfoFile << "Supported file extensions:" << std::endl; + systemInfoFile << extensions << std::endl << std::endl; + systemInfoFile << "Launch command:" << std::endl; + systemInfoFile << commands.front() << std::endl << std::endl; + // Alternative emulator configuration entries. + if (commands.size() > 1) { + systemInfoFile << (commands.size() == 2 ? "Alternative launch command:" : + "Alternative launch commands:") + << std::endl; + for (auto it = commands.cbegin() + 1; it != commands.cend(); it++) + systemInfoFile << (*it) << std::endl; + systemInfoFile << std::endl; + } + systemInfoFile << "Platform (for scraping):" << std::endl; + systemInfoFile << platform << std::endl << std::endl; + systemInfoFile << "Theme folder:" << std::endl; + systemInfoFile << themeFolder << std::endl; + systemInfoFile.close(); + + auto systemIter = std::find_if(systemsVector.cbegin(), systemsVector.cend(), + [systemDir](std::pair system) { + return system.first == systemDir; + }); + + if (systemIter != systemsVector.cend()) + systemsVector.erase(systemIter); + + if (configPaths.size() != 1 && configPath == configPaths.back()) + systemsVector.push_back(std::make_pair(systemDir + " (custom system)", fullname)); + else + systemsVector.push_back(std::make_pair(systemDir, fullname)); + + if (replaceInfoFile) { + LOG(LogInfo) << "Replaced existing system information file \"" + << rompath + systemDir + systemInfoFileName << "\""; + } + else { + LOG(LogInfo) << "Created system information file \"" + << rompath + systemDir + systemInfoFileName << "\""; + } } } @@ -870,8 +939,10 @@ bool SystemData::createSystemDirectories() systemsFileSuccess = false; } else { - for (std::string systemEntry : systemsVector) { - systemsFile << systemEntry << std::endl; + std::sort(systemsVector.begin(), systemsVector.end()); + for (auto systemEntry : systemsVector) { + systemsFile << systemEntry.first.append(": ").append(systemEntry.second) + << std::endl; } systemsFile.close(); } diff --git a/es-app/src/SystemData.h b/es-app/src/SystemData.h index 0b8c7b17c..63691ed92 100644 --- a/es-app/src/SystemData.h +++ b/es-app/src/SystemData.h @@ -102,9 +102,9 @@ public: std::string getLaunchCommandFromLabel(const std::string& label); static void deleteSystems(); - // Loads the systems configuration file at getConfigPath() and creates the systems. + // Loads the systems configuration file(s) at getConfigPath() and creates the systems. static bool loadConfig(); - static std::string getConfigPath(bool legacyWarning); + static std::vector getConfigPath(bool legacyWarning); // Generates the game system directories and information files based on es_systems.xml. static bool createSystemDirectories(); From 466bdc9b923f14e8563cf24974928cefa546f5a1 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 5 Sep 2021 17:47:00 +0200 Subject: [PATCH 06/64] Documentation update. --- CHANGELOG.md | 1 + INSTALL-DEV.md | 48 ++++++++++++++++++++++++++++++++++++++++++------ THEMES-DEV.md | 4 ++-- USERGUIDE-DEV.md | 16 ++++++++++++---- 4 files changed, 57 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e1258a52..94579c16e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### 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 +* Added the ability to make complementary game system customizations without having to replace the entire bundled es_systems.xml file * 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 * Removed the "Choose" entry from the help prompts in the gamelist view diff --git a/INSTALL-DEV.md b/INSTALL-DEV.md index 273b4e4c3..cad4304cd 100644 --- a/INSTALL-DEV.md +++ b/INSTALL-DEV.md @@ -1399,16 +1399,16 @@ For the following options, the es_settings.xml file is immediately updated/saved ## es_systems.xml -The es_systems.xml file contains the system configuration data for ES-DE, written in XML format. This defines the system name, the full system name, the ROM path, the allowed file extensions, the launch command, the platform (for scraping) and the theme to use. +The es_systems.xml file contains the game systems configuration data for ES-DE, written in XML format. This defines the system name, the full system name, the ROM path, the allowed file extensions, the launch command, the platform (for scraping) and the theme to use. -ES-DE ships with a comprehensive `es_systems.xml` configuration file and normally you shouldn't need to modify this. However there may be special circumstances such as wanting to use alternative emulators for some game systems or perhaps you need to add additional systems altogether. +ES-DE ships with a comprehensive `es_systems.xml` file and most users will probably never need to make any customizations. But there may be special circumstances such as wanting to use different emulators for some game systems or perhaps wanting to add additional systems altogether. -To make a customized version of the systems configuration file, it first needs to be copied to `~/.emulationstation/custom_systems/es_systems.xml`. (The tilde symbol `~` translates to `$HOME` on Unix and macOS, and to `%HOMEPATH%` on Windows unless overridden using the --home command line option.) +To accomplish this, ES-DE supports customizations via a separate es_systems.xml file that is to be placed in the `custom_systems` folder in the application home directory, i.e. `~/.emulationstation/custom_systems/es_systems.xml`. (The tilde symbol `~` translates to `$HOME` on Unix and macOS, and to `%HOMEPATH%` on Windows unless overridden via the --home command line option.) + +This custom file functionality is designed to be complementary to the bundled es_systems.xml file, meaning you should only add entries to the custom configuration file for game systems that you actually want to add or override. So for the example of customizing a single system, this file should only contain a single `` tag. The structure of the custom file is identical to the bundled file with the exception of an additional optional tag named ``. If this is placed in the custom es_systems.xml file, ES-DE will not load the bundled file. This is normally not recommended and should only be used for special situations. At the end of this section you can find an example of a custom es_systems.xml file. 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. -Note that when copying the bundled es_systems.xml file to ~/.emulationstation/custom_systems/, it will completely replace the default file processing. So when upgrading to future ES-DE versions, any modifications such as additional game systems will not be enabled until the customized configuration file has been manually updated. - 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. 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. @@ -1424,7 +1424,7 @@ Below is an overview of the file layout with various examples. For the command t + special situations so it's normally recommended to keep this tag unique. --> snes @@ -1567,6 +1567,42 @@ And finally one for Windows: ``` +As well, here's an example on Unix of a custom es_systems.xml file placed in ~/.emulationstation/custom_systems/ that overrides a single game system from the bundled configuration file: +```xml + + + + + nes + Nintendo Entertainment System + %ROMPATH%/nes + .nes .NES .zip .ZIP + /usr/games/fceux %ROM% + nes + nes + + +``` + +If adding the `` tag to the file, the bundled es_systems.xml file will not be processed. For this example it wouldn't be a very good idea as NES would then be the only platform that could be used in ES-DE. + +```xml + + + + + + nes + Nintendo Entertainment System + %ROMPATH%/nes + .nes .NES .zip .ZIP + /usr/games/fceux %ROM% + nes + nes + + +``` + ## 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/THEMES-DEV.md b/THEMES-DEV.md index 8999bee1b..a42c00152 100644 --- a/THEMES-DEV.md +++ b/THEMES-DEV.md @@ -864,9 +864,9 @@ EmulationStation borrows the concept of "nine patches" from Android (or "9-Slice - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. * `textColor` - type: COLOR. Default is 777777FF. -* `textColorDimmed` - type: COLOR. Default is the same value as textColor. +* `textColorDimmed` - type: COLOR. Default is the same value as textColor. Must be placed under the 'system' view. * `iconColor` - type: COLOR. Default is 777777FF. -* `iconColorDimmed` - type: COLOR. Default is the same value as iconColor. +* `iconColorDimmed` - type: COLOR. Default is the same value as iconColor. Must be placed under the 'system' view. * `fontPath` - type: PATH. * `fontSize` - type: FLOAT. * `entrySpacing` - type: FLOAT. Default is 16.0. diff --git a/USERGUIDE-DEV.md b/USERGUIDE-DEV.md index dcbb2d736..83dd4cae3 100644 --- a/USERGUIDE-DEV.md +++ b/USERGUIDE-DEV.md @@ -77,9 +77,9 @@ On Unix this means /home/\/.emulationstation/, on macOS /Users/\ Date: Sun, 5 Sep 2021 18:10:59 +0200 Subject: [PATCH 07/64] Documentation update to clarify the complementary systems customization. --- INSTALL-DEV.md | 6 +++--- USERGUIDE-DEV.md | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/INSTALL-DEV.md b/INSTALL-DEV.md index cad4304cd..cb18ceb84 100644 --- a/INSTALL-DEV.md +++ b/INSTALL-DEV.md @@ -1401,11 +1401,11 @@ For the following options, the es_settings.xml file is immediately updated/saved The es_systems.xml file contains the game systems configuration data for ES-DE, written in XML format. This defines the system name, the full system name, the ROM path, the allowed file extensions, the launch command, the platform (for scraping) and the theme to use. -ES-DE ships with a comprehensive `es_systems.xml` file and most users will probably never need to make any customizations. But there may be special circumstances such as wanting to use different emulators for some game systems or perhaps wanting to add additional systems altogether. +ES-DE ships with a comprehensive `es_systems.xml` file and most users will probably never need to make any customizations. But there may be special circumstances such as wanting to use different emulators for some game systems or perhaps to add additional systems altogether. To accomplish this, ES-DE supports customizations via a separate es_systems.xml file that is to be placed in the `custom_systems` folder in the application home directory, i.e. `~/.emulationstation/custom_systems/es_systems.xml`. (The tilde symbol `~` translates to `$HOME` on Unix and macOS, and to `%HOMEPATH%` on Windows unless overridden via the --home command line option.) -This custom file functionality is designed to be complementary to the bundled es_systems.xml file, meaning you should only add entries to the custom configuration file for game systems that you actually want to add or override. So for the example of customizing a single system, this file should only contain a single `` tag. The structure of the custom file is identical to the bundled file with the exception of an additional optional tag named ``. If this is placed in the custom es_systems.xml file, ES-DE will not load the bundled file. This is normally not recommended and should only be used for special situations. At the end of this section you can find an example of a custom es_systems.xml file. +This custom file functionality is designed to be complementary to the bundled es_systems.xml file, meaning you should only add entries to the custom configuration file for game systems that you actually want to add or override. So to for example customize a single system, this file should only contain a single `` tag. The structure of the custom file is identical to the bundled file with the exception of an additional optional tag named ``. If this is placed in the custom es_systems.xml file, ES-DE will not load the bundled file. This is normally not recommended and should only be used for special situations. At the end of this section you can find an example of a custom es_systems.xml file. 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. @@ -1567,7 +1567,7 @@ And finally one for Windows: ``` -As well, here's an example on Unix of a custom es_systems.xml file placed in ~/.emulationstation/custom_systems/ that overrides a single game system from the bundled configuration file: +As well, here's an example for Unix of a custom es_systems.xml file placed in ~/.emulationstation/custom_systems/ that overrides a single game system from the bundled configuration file: ```xml diff --git a/USERGUIDE-DEV.md b/USERGUIDE-DEV.md index 83dd4cae3..b0e689e42 100644 --- a/USERGUIDE-DEV.md +++ b/USERGUIDE-DEV.md @@ -132,11 +132,9 @@ _This is the dialog shown if no game files were found. It lets you configure the 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`. -Although it's possible to make a copy of the bundled configuration file, modify it and then place it in this directory, that is not how the custom file is designed to be used. Instead the intention is that the file placed in the custom_systems directory complements the bundled file, meaning only the systems that are to be customized or added should be included. For example you may want to replace the emulator, modify the full name or change the supported file extensions for a single system. In this case it wouldn't make sense to add the complete bundled file with these minor modifications. Also, future updates to ES-DE may contain changes to existing emulator entries which would then not be used as the custom file takes precedence over the bundled file. +Although it's possible to make a copy of the bundled configuration file, to modify it and then place it in this directory, that is not how the system customization is designed to be done. Instead the intention is that the file in the custom_systems directory complements the bundled configuration. This means that only systems that are to be modified should be included. 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. As well, future updates to ES-DE may contain changes to existing emulator entries which would then not be utilized as the custom configuration file takes precedence over the bundled file. -To clarify, the custom es_systems.xml file is loaded first, followed by the bundled file. - -Although unlikely to be needed, it's also possible to skip the loading of the bundled es_systems.xml file and only use the file in custom_systems. The instructions for how to accomplish this as well as how to adapt the es_systems.xml file can be found in [INSTALL-DEV.md](INSTALL-DEV.md#es_systemsxml). +It's also possible to skip the loading of the bundled es_systems.xml file and only use the file in custom_systems, although this will probably rarely be needed. The instructions for how to accomplish this as well as how to customize the es_systems.xml file can be found in [INSTALL-DEV.md](INSTALL-DEV.md#es_systemsxml). ## Migrating from other EmulationStation forks From 260ad2d8f0cc34045efac97d7847c5bb39e35247 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 5 Sep 2021 18:39:53 +0200 Subject: [PATCH 08/64] (Windows) Fixed a compile error. --- es-app/src/SystemData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index b91ed7e73..0c10905ee 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -738,7 +738,7 @@ bool SystemData::createSystemDirectories() pugi::xml_document doc; #if defined(_WIN64) pugi::xml_parse_result res = - doc.load_file(Utils::String::stringToWideString(configPath).c_str()); + doc.load_file(Utils::String::stringToWideString(configPaths.front()).c_str()); #else pugi::xml_parse_result res = doc.load_file(configPaths.front().c_str()); #endif From 42458a7d76e1e89d8a76cb0c412019f847ca8406 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 17 Sep 2021 21:10:16 +0200 Subject: [PATCH 09/64] Very minor code cleanup. --- es-app/src/main.cpp | 1 - es-core/src/utils/MathUtil.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index 46ed7ebe3..db3544b91 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -29,7 +29,6 @@ #include "Sound.h" #include "SystemData.h" #include "SystemScreensaver.h" -#include "guis/GuiComplexTextEditPopup.h" #include "guis/GuiDetectDevice.h" #include "guis/GuiLaunchScreen.h" #include "guis/GuiMsgBox.h" diff --git a/es-core/src/utils/MathUtil.h b/es-core/src/utils/MathUtil.h index f2443d313..34fb84131 100644 --- a/es-core/src/utils/MathUtil.h +++ b/es-core/src/utils/MathUtil.h @@ -34,7 +34,7 @@ namespace Utils const float scrollLength); // The MD5 functions are derived from the RSA Data Security, Inc. MD5 Message-Digest - // Algorithm. Based on this code: https://github.com/yaoyao-cn/md5/blob/master/md5.cpp + // Algorithm. std::string md5Hash(const std::string& data); void md5Update(const unsigned char* buf, unsigned int length, From 13abaf6734a049c001df7e73505d4cbdbd086439 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 17 Sep 2021 21:14:43 +0200 Subject: [PATCH 10/64] Added support for including the left and right trigger buttons in the help prompts. --- es-core/src/HelpStyle.cpp | 4 ++++ es-core/src/HelpStyle.h | 2 ++ es-core/src/Window.cpp | 4 +++- es-core/src/components/HelpComponent.cpp | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/es-core/src/HelpStyle.cpp b/es-core/src/HelpStyle.cpp index 5c0f069f1..3d979a48f 100644 --- a/es-core/src/HelpStyle.cpp +++ b/es-core/src/HelpStyle.cpp @@ -89,6 +89,10 @@ void HelpStyle::applyTheme(const std::shared_ptr& theme, const std::s mCustomButtons.button_r = elem->get("button_r"); if (elem->has("button_lr")) mCustomButtons.button_lr = elem->get("button_lr"); + if (elem->has("button_lt")) + mCustomButtons.button_lt = elem->get("button_lt"); + if (elem->has("button_rt")) + mCustomButtons.button_rt = elem->get("button_rt"); // SNES. if (elem->has("button_a_SNES")) diff --git a/es-core/src/HelpStyle.h b/es-core/src/HelpStyle.h index 737123ad0..0eee99dbb 100644 --- a/es-core/src/HelpStyle.h +++ b/es-core/src/HelpStyle.h @@ -40,6 +40,8 @@ struct HelpStyle { std::string button_l; std::string button_r; std::string button_lr; + std::string button_lt; + std::string button_rt; // SNES. std::string button_a_SNES; diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index 8b021ed9b..cea7e1066 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -657,8 +657,10 @@ void Window::setHelpPrompts(const std::vector& prompts, const HelpSt "b", "x", "y", - "l", "r", + "l", + "rt", + "lt", "start", "back"}; int i = 0; diff --git a/es-core/src/components/HelpComponent.cpp b/es-core/src/components/HelpComponent.cpp index 4a6bfb28b..69c1ae32c 100644 --- a/es-core/src/components/HelpComponent.cpp +++ b/es-core/src/components/HelpComponent.cpp @@ -51,6 +51,10 @@ void HelpComponent::assignIcons() mStyle.mCustomButtons.button_r; sIconPathMap["lr"] = mStyle.mCustomButtons.button_lr.empty() ? ":/help/button_lr.svg" : mStyle.mCustomButtons.button_lr; + sIconPathMap["lt"] = mStyle.mCustomButtons.button_lt.empty() ? ":/help/button_lt.svg" : + mStyle.mCustomButtons.button_lt; + sIconPathMap["rt"] = mStyle.mCustomButtons.button_rt.empty() ? ":/help/button_rt.svg" : + mStyle.mCustomButtons.button_rt; // These graphics files are custom per controller type. if (controllerType == "snes") { From 03645e2de3ae5f78211e964df3abbca860a14ab2 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 17 Sep 2021 21:17:11 +0200 Subject: [PATCH 11/64] Fixed an issue where 'sortname' was incorrectly spelled in the metadata editor. --- es-app/src/MetaData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-app/src/MetaData.cpp b/es-app/src/MetaData.cpp index c514cfb57..18b3557bb 100644 --- a/es-app/src/MetaData.cpp +++ b/es-app/src/MetaData.cpp @@ -20,7 +20,7 @@ MetaDataDecl gameDecls[] = { // key, type, default, statistic, name in GuiMetaDataEd, prompt in GuiMetaDataEd, shouldScrape {"name", MD_STRING, "", false, "name", "enter name", true}, -{"sortname", MD_STRING, "", false, "sortname", "enter sort name", false}, +{"sortname", MD_STRING, "", false, "sortname", "enter sortname", false}, {"desc", MD_MULTILINE_STRING, "", false, "description", "enter description", true}, {"rating", MD_RATING, "0", false, "rating", "enter rating", true}, {"releasedate", MD_DATE, "19700101T010000", false, "release date", "enter release date", true}, From db4fb1ab92e5f06a411da002540c35dd7fee9d7e Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 17 Sep 2021 21:25:21 +0200 Subject: [PATCH 12/64] Added support for a new type of 'flat style' buttons to ButtonComponent. Also did some general code cleanup. --- es-core/src/components/ButtonComponent.cpp | 172 +++++++++++++-------- es-core/src/components/ButtonComponent.h | 59 ++++--- 2 files changed, 145 insertions(+), 86 deletions(-) diff --git a/es-core/src/components/ButtonComponent.cpp b/es-core/src/components/ButtonComponent.cpp index 6ba641495..3143f52a9 100644 --- a/es-core/src/components/ButtonComponent.cpp +++ b/es-core/src/components/ButtonComponent.cpp @@ -15,24 +15,85 @@ ButtonComponent::ButtonComponent(Window* window, const std::string& text, const std::string& helpText, - const std::function& func) - : GuiComponent(window) - , mBox(window, ":/graphics/button.svg") - , mFont(Font::get(FONT_SIZE_MEDIUM)) - , mFocused(false) - , mEnabled(true) - , mTextColorFocused(0xFFFFFFFF) - , mTextColorUnfocused(0x777777FF) + const std::function& func, + bool upperCase, + bool flatStyle) + : GuiComponent{window} + , mBox{window, ":/graphics/button.svg"} + , mFont{Font::get(FONT_SIZE_MEDIUM)} + , mPadding{{}} + , mFocused{false} + , mEnabled{true} + , mFlatStyle{flatStyle} + , mTextColorFocused{0xFFFFFFFF} + , mTextColorUnfocused{0x777777FF} + , mFlatColorFocused{0x878787FF} + , mFlatColorUnfocused{0x60606025} + { setPressedFunc(func); - setText(text, helpText); - updateImage(); + setText(text, helpText, upperCase); + + if (!mFlatStyle) + updateImage(); } void ButtonComponent::onSizeChanged() { - // Fit to mBox. - mBox.fitTo(mSize, glm::vec3{}, glm::vec2{-32.0f, -32.0f}); + if (mFlatStyle) + return; + + auto cornerSize = mBox.getCornerSize(); + + mBox.fitTo(glm::vec2{mSize.x - mPadding.x - mPadding.z, mSize.y - mPadding.y - mPadding.w}, + glm::vec3{mPadding.x, mPadding.y, 0.0f}, + glm::vec2{-cornerSize.x * 2.0f, -cornerSize.y * 2.0f}); +} + +void ButtonComponent::onFocusGained() +{ + mFocused = true; + if (!mFlatStyle) + updateImage(); +} + +void ButtonComponent::onFocusLost() +{ + mFocused = false; + if (!mFlatStyle) + updateImage(); +} + +void ButtonComponent::setText(const std::string& text, const std::string& helpText, bool upperCase) +{ + mText = upperCase ? Utils::String::toUpper(text) : text; + mHelpText = helpText; + + mTextCache = + std::unique_ptr(mFont->buildTextCache(mText, 0.0f, 0.0f, getCurTextColor())); + + float minWidth = mFont->sizeText("DELETE").x + (12.0f * Renderer::getScreenWidthModifier()); + setSize(std::max(mTextCache->metrics.size.x + (12.0f * Renderer::getScreenWidthModifier()), + minWidth), + mTextCache->metrics.size.y); + + updateHelpPrompts(); +} + +void ButtonComponent::setEnabled(bool state) +{ + mEnabled = state; + if (!mFlatStyle) + updateImage(); +} + +void ButtonComponent::setPadding(const glm::vec4 padding) +{ + if (mPadding == padding) + return; + + mPadding = padding; + onSizeChanged(); } bool ButtonComponent::input(InputConfig* config, Input input) @@ -46,58 +107,27 @@ bool ButtonComponent::input(InputConfig* config, Input input) return GuiComponent::input(config, input); } -void ButtonComponent::setText(const std::string& text, const std::string& helpText) -{ - mText = Utils::String::toUpper(text); - mHelpText = helpText; - - mTextCache = std::unique_ptr(mFont->buildTextCache(mText, 0, 0, getCurTextColor())); - - float minWidth = mFont->sizeText("DELETE").x + (12.0f * Renderer::getScreenWidthModifier()); - setSize(std::max(mTextCache->metrics.size.x + (12.0f * Renderer::getScreenWidthModifier()), - minWidth), - mTextCache->metrics.size.y); - - updateHelpPrompts(); -} - -void ButtonComponent::onFocusGained() -{ - mFocused = true; - updateImage(); -} - -void ButtonComponent::onFocusLost() -{ - mFocused = false; - updateImage(); -} - -void ButtonComponent::setEnabled(bool state) -{ - mEnabled = state; - updateImage(); -} - -void ButtonComponent::updateImage() -{ - if (!mEnabled || !mPressedFunc) { - mBox.setImagePath(":/graphics/button_filled.svg"); - mBox.setCenterColor(0x770000FF); - mBox.setEdgeColor(0x770000FF); - return; - } - - mBox.setCenterColor(0xFFFFFFFF); - mBox.setEdgeColor(0xFFFFFFFF); - mBox.setImagePath(mFocused ? ":/graphics/button_filled.svg" : ":/graphics/button.svg"); -} - void ButtonComponent::render(const glm::mat4& parentTrans) { glm::mat4 trans{parentTrans * getTransform()}; - mBox.render(trans); + if (mFlatStyle) { + if (mFocused) { + Renderer::setMatrix(trans); + Renderer::drawRect(mPadding.x, mPadding.y, mSize.x - mPadding.x - mPadding.z, + mSize.y - mPadding.y - mPadding.w, mFlatColorFocused, + mFlatColorFocused); + } + else { + Renderer::setMatrix(trans); + Renderer::drawRect(mPadding.x, mPadding.y, mSize.x - mPadding.x - mPadding.z, + mSize.y - mPadding.y - mPadding.w, mFlatColorUnfocused, + mFlatColorUnfocused); + } + } + else { + mBox.render(trans); + } if (mTextCache) { glm::vec3 centerOffset{(mSize.x - mTextCache->metrics.size.x) / 2.0f, @@ -121,6 +151,13 @@ void ButtonComponent::render(const glm::mat4& parentTrans) renderChildren(trans); } +std::vector ButtonComponent::getHelpPrompts() +{ + std::vector prompts; + prompts.push_back(HelpPrompt("a", mHelpText.empty() ? mText.c_str() : mHelpText.c_str())); + return prompts; +} + unsigned int ButtonComponent::getCurTextColor() const { if (!mFocused) @@ -129,9 +166,16 @@ unsigned int ButtonComponent::getCurTextColor() const return mTextColorFocused; } -std::vector ButtonComponent::getHelpPrompts() +void ButtonComponent::updateImage() { - std::vector prompts; - prompts.push_back(HelpPrompt("a", mHelpText.empty() ? mText.c_str() : mHelpText.c_str())); - return prompts; + if (!mEnabled || !mPressedFunc) { + mBox.setImagePath(":/graphics/button_filled.svg"); + mBox.setCenterColor(0x770000FF); + mBox.setEdgeColor(0x770000FF); + return; + } + + mBox.setCenterColor(0xFFFFFFFF); + mBox.setEdgeColor(0xFFFFFFFF); + mBox.setImagePath(mFocused ? ":/graphics/button_filled.svg" : ":/graphics/button.svg"); } diff --git a/es-core/src/components/ButtonComponent.h b/es-core/src/components/ButtonComponent.h index 75f3c4660..55ad497db 100644 --- a/es-core/src/components/ButtonComponent.h +++ b/es-core/src/components/ButtonComponent.h @@ -20,41 +20,56 @@ public: ButtonComponent(Window* window, const std::string& text = "", const std::string& helpText = "", - const std::function& func = nullptr); - - void setPressedFunc(std::function f) { mPressedFunc = f; } - void setEnabled(bool state) override; - - bool input(InputConfig* config, Input input) override; - void render(const glm::mat4& parentTrans) override; - - void setText(const std::string& text, const std::string& helpText); - - const std::string& getText() const { return mText; } - const std::function& getPressedFunc() const { return mPressedFunc; } + const std::function& func = nullptr, + bool upperCase = true, + bool flatStyle = false); void onSizeChanged() override; void onFocusGained() override; void onFocusLost() override; + void setText(const std::string& text, const std::string& helpText, bool upperCase = true); + const std::string& getText() const { return mText; } + + void setPressedFunc(std::function f) { mPressedFunc = f; } + void setEnabled(bool state) override; + + void setPadding(const glm::vec4 padding); + glm::vec4 getPadding() { return mPadding; } + + void setFlatColorFocused(unsigned int color) { mFlatColorFocused = color; } + void setFlatColorUnfocused(unsigned int color) { mFlatColorUnfocused = color; } + + const std::function& getPressedFunc() const { return mPressedFunc; } + + bool input(InputConfig* config, Input input) override; + void render(const glm::mat4& parentTrans) override; + virtual std::vector getHelpPrompts() override; private: - std::shared_ptr mFont; - std::function mPressedFunc; - - bool mFocused; - bool mEnabled; - unsigned int mTextColorFocused; - unsigned int mTextColorUnfocused; - unsigned int getCurTextColor() const; void updateImage(); + NinePatchComponent mBox; + + std::shared_ptr mFont; + std::unique_ptr mTextCache; + std::function mPressedFunc; + + glm::vec4 mPadding; + std::string mText; std::string mHelpText; - std::unique_ptr mTextCache; - NinePatchComponent mBox; + + bool mFocused; + bool mEnabled; + bool mFlatStyle; + + unsigned int mTextColorFocused; + unsigned int mTextColorUnfocused; + unsigned int mFlatColorFocused; + unsigned int mFlatColorUnfocused; }; #endif // ES_CORE_COMPONENTS_BUTTON_COMPONENT_H From 08790ed1f3f87be281c034b1a12bf2ace3ca3f20 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 17 Sep 2021 21:35:37 +0200 Subject: [PATCH 13/64] Added support for correctly navigating arbitrarily sized ComponentGrid entries. Also added a callback for handling navigation attempts beyond the grid boundary as well as a function to move to an absolute cursor position. --- es-core/src/components/ComponentGrid.cpp | 68 ++++++++++++++++++++++-- es-core/src/components/ComponentGrid.h | 9 ++++ 2 files changed, 72 insertions(+), 5 deletions(-) diff --git a/es-core/src/components/ComponentGrid.cpp b/es-core/src/components/ComponentGrid.cpp index 496cda1fd..be6f43732 100644 --- a/es-core/src/components/ComponentGrid.cpp +++ b/es-core/src/components/ComponentGrid.cpp @@ -252,19 +252,24 @@ bool ComponentGrid::input(InputConfig* config, Input input) if (!input.value) return false; + bool withinBoundary = false; + if (config->isMappedLike("down", input)) - return moveCursor(glm::ivec2{0, 1}); + withinBoundary = moveCursor(glm::ivec2{0, 1}); if (config->isMappedLike("up", input)) - return moveCursor(glm::ivec2{0, -1}); + withinBoundary = moveCursor(glm::ivec2{0, -1}); if (config->isMappedLike("left", input)) - return moveCursor(glm::ivec2{-1, 0}); + withinBoundary = moveCursor(glm::ivec2{-1, 0}); if (config->isMappedLike("right", input)) - return moveCursor(glm::ivec2{1, 0}); + withinBoundary = moveCursor(glm::ivec2{1, 0}); - return false; + if (!withinBoundary && mPastBoundaryCallback) + return mPastBoundaryCallback(config, input); + + return withinBoundary; } void ComponentGrid::resetCursor() @@ -290,6 +295,34 @@ bool ComponentGrid::moveCursor(glm::ivec2 dir) const GridEntry* currentCursorEntry = getCellAt(mCursor); glm::ivec2 searchAxis(dir.x == 0, dir.y == 0); + // Logic to handle entries that span several cells. + if (currentCursorEntry->dim.x > 1) { + if (dir.x < 0 && currentCursorEntry->pos.x == 0 && mCursor.x > currentCursorEntry->pos.x) { + onCursorMoved(mCursor, glm::ivec2{0, mCursor.y}); + mCursor.x = 0; + return false; + } + + if (dir.x > 0 && currentCursorEntry->pos.x + currentCursorEntry->dim.x == mGridSize.x && + mCursor.x < currentCursorEntry->pos.x + currentCursorEntry->dim.x - 1) { + onCursorMoved(mCursor, glm::ivec2{mGridSize.x - 1, mCursor.y}); + mCursor.x = mGridSize.x - 1; + return false; + } + + if (dir.x > 0 && mCursor.x != currentCursorEntry->pos.x + currentCursorEntry->dim.x - 1) + dir.x = currentCursorEntry->dim.x - (mCursor.x - currentCursorEntry->pos.x); + else if (dir.x < 0 && mCursor.x != currentCursorEntry->pos.x) + dir.x = -(mCursor.x - currentCursorEntry->pos.x + 1); + } + + if (currentCursorEntry->dim.y > 1) { + if (dir.y > 0 && mCursor.y != currentCursorEntry->pos.y + currentCursorEntry->dim.y - 1) + dir.y = currentCursorEntry->dim.y - (mCursor.y - currentCursorEntry->pos.y); + else if (dir.y < 0 && mCursor.y != currentCursorEntry->pos.y) + dir.y = -(mCursor.y - currentCursorEntry->pos.y + 1); + } + while (mCursor.x >= 0 && mCursor.y >= 0 && mCursor.x < mGridSize.x && mCursor.y < mGridSize.y) { mCursor = mCursor + dir; glm::ivec2 curDirPos{mCursor}; @@ -299,6 +332,13 @@ bool ComponentGrid::moveCursor(glm::ivec2 dir) while (mCursor.x < mGridSize.x && mCursor.y < mGridSize.y && mCursor.x >= 0 && mCursor.y >= 0) { cursorEntry = getCellAt(mCursor); + + // Multi-cell entries. + if (dir.x < 0 && cursorEntry->dim.x > 1) + mCursor.x = getCellAt(origCursor)->pos.x - cursorEntry->dim.x; + if (dir.y < 0 && cursorEntry->dim.y > 1) + mCursor.y = getCellAt(origCursor)->pos.y - cursorEntry->dim.y; + if (cursorEntry && cursorEntry->canFocus && cursorEntry != currentCursorEntry) { onCursorMoved(origCursor, mCursor); return true; @@ -326,6 +366,24 @@ bool ComponentGrid::moveCursor(glm::ivec2 dir) return false; } +void ComponentGrid::moveCursorTo(int xPos, int yPos, bool selectLeftCell) +{ + const glm::ivec2 origCursor{mCursor}; + + if (xPos != -1) + mCursor.x = xPos; + if (yPos != -1) + mCursor.y = yPos; + + const GridEntry* currentCursorEntry = getCellAt(mCursor); + + // If requested, select the leftmost cell of entries wider than 1 cell. + if (selectLeftCell && mCursor.x > currentCursorEntry->pos.x) + mCursor.x = currentCursorEntry->pos.x; + + onCursorMoved(origCursor, mCursor); +} + void ComponentGrid::onFocusLost() { const GridEntry* cursorEntry = getCellAt(mCursor); diff --git a/es-core/src/components/ComponentGrid.h b/es-core/src/components/ComponentGrid.h index c52e8271a..85385f27d 100644 --- a/es-core/src/components/ComponentGrid.h +++ b/es-core/src/components/ComponentGrid.h @@ -46,6 +46,11 @@ public: unsigned int border = GridFlags::BORDER_NONE, GridFlags::UpdateType updateType = GridFlags::UPDATE_ALWAYS); + void setPastBoundaryCallback(const std::function& func) + { + mPastBoundaryCallback = func; + } + void textInput(const std::string& text) override; bool input(InputConfig* config, Input input) override; void update(int deltaTime) override; @@ -65,6 +70,8 @@ public: void setRowHeightPerc(int row, float height, bool update = true); bool moveCursor(glm::ivec2 dir); + // Pass -1 for xPos or yPos to keep its axis cursor position. + void moveCursorTo(int xPos, int yPos, bool selectLeftCell = false); void setCursorTo(const std::shared_ptr& comp); std::shared_ptr getSelectedComponent() @@ -126,6 +133,8 @@ private: std::vector mCells; glm::ivec2 mCursor; + std::function mPastBoundaryCallback; + float* mRowHeights; float* mColWidths; }; From bbaf2739d40a37b442ca75265610bf60a724c4e2 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 17 Sep 2021 21:40:48 +0200 Subject: [PATCH 14/64] Added a blinking cursor to TextEditComponent. Also fixed a text field sizing bug and made a small padding adjustment. --- es-core/src/components/TextEditComponent.cpp | 110 ++++++++++--------- es-core/src/components/TextEditComponent.h | 2 +- 2 files changed, 59 insertions(+), 53 deletions(-) diff --git a/es-core/src/components/TextEditComponent.cpp b/es-core/src/components/TextEditComponent.cpp index 7ed097944..ce35ea84e 100644 --- a/es-core/src/components/TextEditComponent.cpp +++ b/es-core/src/components/TextEditComponent.cpp @@ -10,25 +10,27 @@ #include "utils/StringUtil.h" -#define TEXT_PADDING_HORIZ 10.0f +#define TEXT_PADDING_HORIZ 12.0f #define TEXT_PADDING_VERT 2.0f #define CURSOR_REPEAT_START_DELAY 500 #define CURSOR_REPEAT_SPEED 28 // Lower is faster. +#define BLINKTIME 1000 + TextEditComponent::TextEditComponent(Window* window) - : GuiComponent(window) - , mBox(window, ":/graphics/textinput.svg") - , mFocused(false) - , mScrollOffset(0.0f, 0.0f) - , mCursor(0) - , mEditing(false) - , mFont(Font::get(FONT_SIZE_MEDIUM, FONT_PATH_LIGHT)) - , mCursorRepeatDir(0) + : GuiComponent{window} + , mBox{window, ":/graphics/textinput.svg"} + , mFocused{false} + , mScrollOffset{0.0f, 0.0f} + , mCursor{0} + , mEditing{false} + , mFont{Font::get(FONT_SIZE_MEDIUM, FONT_PATH_LIGHT)} + , mCursorRepeatDir{0} + , mBlinkTime{0} { addChild(&mBox); onFocusLost(); - mResolutionAdjustment = -(34.0f * Renderer::getScreenWidthModifier() - 34.0f); setSize(4096, mFont->getHeight() + (TEXT_PADDING_VERT * Renderer::getScreenHeightModifier())); } @@ -36,6 +38,7 @@ void TextEditComponent::onFocusGained() { mFocused = true; mBox.setImagePath(":/graphics/textinput_focused.svg"); + startEditing(); } void TextEditComponent::onFocusLost() @@ -46,9 +49,9 @@ void TextEditComponent::onFocusLost() void TextEditComponent::onSizeChanged() { - mBox.fitTo(mSize, glm::vec3{}, - glm::vec2{-34.0f + mResolutionAdjustment, - -32.0f - (TEXT_PADDING_VERT * Renderer::getScreenHeightModifier())}); + mBox.fitTo( + mSize, glm::vec3{}, + glm::vec2{-34.0f, -32.0f - (TEXT_PADDING_VERT * Renderer::getScreenHeightModifier())}); onTextChanged(); // Wrap point probably changed. } @@ -62,6 +65,7 @@ void TextEditComponent::setValue(const std::string& val) void TextEditComponent::textInput(const std::string& text) { if (mEditing) { + mBlinkTime = 0; mCursorRepeatDir = 0; if (text[0] == '\b') { if (mCursor > 0) { @@ -82,17 +86,17 @@ void TextEditComponent::textInput(const std::string& text) void TextEditComponent::startEditing() { - if (!isMultiline()) - setCursor(mText.size()); SDL_StartTextInput(); mEditing = true; updateHelpPrompts(); + mBlinkTime = BLINKTIME / 6; } void TextEditComponent::stopEditing() { SDL_StopTextInput(); mEditing = false; + mCursorRepeatDir = 0; updateHelpPrompts(); } @@ -141,41 +145,33 @@ bool TextEditComponent::input(InputConfig* config, Input input) return true; } - // Done editing (accept changes). - if ((config->getDeviceId() == DEVICE_KEYBOARD && input.id == SDLK_ESCAPE) || - (config->getDeviceId() != DEVICE_KEYBOARD && - (config->isMappedTo("a", input) || config->isMappedTo("b", input)))) { - mTextOrig = mText; - stopEditing(); - return true; - } - else if (cursor_left || cursor_right) { + if (cursor_left || cursor_right) { + mBlinkTime = 0; mCursorRepeatDir = cursor_left ? -1 : 1; mCursorRepeatTimer = -(CURSOR_REPEAT_START_DELAY - CURSOR_REPEAT_SPEED); moveCursor(mCursorRepeatDir); } - else if (cursor_up) { - // TODO - } + // Stop editing and let the button down event be captured by the parent component. else if (cursor_down) { - // TODO + stopEditing(); + return false; } else if (shoulder_left || shoulder_right) { + mBlinkTime = 0; mCursorRepeatDir = shoulder_left ? -10 : 10; mCursorRepeatTimer = -(CURSOR_REPEAT_START_DELAY - CURSOR_REPEAT_SPEED); moveCursor(mCursorRepeatDir); } // Jump to beginning of text. else if (trigger_left) { + mBlinkTime = 0; setCursor(0); } // Jump to end of text. else if (trigger_right) { + mBlinkTime = 0; setCursor(mText.length()); } - else if (config->getDeviceId() != DEVICE_KEYBOARD && config->isMappedTo("y", input)) { - textInput("\b"); - } else if (config->getDeviceId() == DEVICE_KEYBOARD) { switch (input.id) { case SDLK_HOME: { @@ -207,6 +203,10 @@ void TextEditComponent::update(int deltaTime) { updateCursorRepeat(deltaTime); GuiComponent::update(deltaTime); + + mBlinkTime += deltaTime; + if (mBlinkTime >= BLINKTIME) + mBlinkTime = 0; } void TextEditComponent::updateCursorRepeat(int deltaTime) @@ -216,6 +216,7 @@ void TextEditComponent::updateCursorRepeat(int deltaTime) mCursorRepeatTimer += deltaTime; while (mCursorRepeatTimer >= CURSOR_REPEAT_SPEED) { + mBlinkTime = 0; moveCursor(mCursorRepeatDir); mCursorRepeatTimer -= CURSOR_REPEAT_SPEED; } @@ -298,34 +299,39 @@ void TextEditComponent::render(const glm::mat4& parentTrans) Renderer::popClipRect(); // Draw cursor. - if (mEditing) { - glm::vec2 cursorPos; - if (isMultiline()) { - cursorPos = mFont->getWrappedTextCursorOffset(mText, getTextAreaSize().x, mCursor); - } - else { - cursorPos = mFont->sizeText(mText.substr(0, mCursor)); - cursorPos[1] = 0; - } + glm::vec2 cursorPos; + if (isMultiline()) { + cursorPos = mFont->getWrappedTextCursorOffset(mText, getTextAreaSize().x, mCursor); + } + else { + cursorPos = mFont->sizeText(mText.substr(0, mCursor)); + cursorPos[1] = 0; + } - float cursorHeight = mFont->getHeight() * 0.8f; + float cursorHeight = mFont->getHeight() * 0.8f; + + if (!mEditing) { Renderer::drawRect(cursorPos.x, cursorPos.y + (mFont->getHeight() - cursorHeight) / 2.0f, - 2.0f * Renderer::getScreenWidthModifier(), cursorHeight, 0x000000FF, - 0x000000FF); + 2.0f * Renderer::getScreenWidthModifier(), cursorHeight, 0xC7C7C7FF, + 0xC7C7C7FF); + } + + if (mEditing && mBlinkTime < BLINKTIME / 2) { + Renderer::drawRect(cursorPos.x, cursorPos.y + (mFont->getHeight() - cursorHeight) / 2.0f, + 2.0f * Renderer::getScreenWidthModifier(), cursorHeight, 0x777777FF, + 0x777777FF); } } glm::vec2 TextEditComponent::getTextAreaPos() const { - return glm::vec2{ - (-mResolutionAdjustment + (TEXT_PADDING_HORIZ * Renderer::getScreenWidthModifier())) / 2.0f, - (TEXT_PADDING_VERT * Renderer::getScreenHeightModifier()) / 2.0f}; + return glm::vec2{(TEXT_PADDING_HORIZ * Renderer::getScreenWidthModifier()) / 2.0f, + (TEXT_PADDING_VERT * Renderer::getScreenHeightModifier()) / 2.0f}; } glm::vec2 TextEditComponent::getTextAreaSize() const { - return glm::vec2{mSize.x + mResolutionAdjustment - - (TEXT_PADDING_HORIZ * Renderer::getScreenWidthModifier()), + return glm::vec2{mSize.x - (TEXT_PADDING_HORIZ * Renderer::getScreenWidthModifier()), mSize.y - (TEXT_PADDING_VERT * Renderer::getScreenHeightModifier())}; } @@ -333,10 +339,10 @@ std::vector TextEditComponent::getHelpPrompts() { std::vector prompts; if (mEditing) { - prompts.push_back(HelpPrompt("up/down/left/right", "move cursor")); - prompts.push_back(HelpPrompt("y", "backspace")); - prompts.push_back(HelpPrompt("a", "accept changes")); - prompts.push_back(HelpPrompt("b", "accept changes")); + prompts.push_back(HelpPrompt("lt", "first")); + prompts.push_back(HelpPrompt("rt", "last")); + prompts.push_back(HelpPrompt("left/right", "move cursor")); + prompts.push_back(HelpPrompt("b", "back")); } else { prompts.push_back(HelpPrompt("a", "edit")); diff --git a/es-core/src/components/TextEditComponent.h b/es-core/src/components/TextEditComponent.h index a350ed306..ab2232162 100644 --- a/es-core/src/components/TextEditComponent.h +++ b/es-core/src/components/TextEditComponent.h @@ -61,6 +61,7 @@ private: bool mFocused; bool mEditing; unsigned int mCursor; // Cursor position in characters. + int mBlinkTime; int mCursorRepeatTimer; int mCursorRepeatDir; @@ -68,7 +69,6 @@ private: glm::vec2 mScrollOffset; NinePatchComponent mBox; - float mResolutionAdjustment; std::shared_ptr mFont; std::unique_ptr mTextCache; From c4e6d3cac1075b65db83637d5e6fe92d4b1811fe Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 17 Sep 2021 22:23:41 +0200 Subject: [PATCH 15/64] Added a virtual keyboard. --- .../src/guis/GuiCollectionSystemsOptions.cpp | 20 +- es-app/src/guis/GuiGamelistFilter.cpp | 20 +- es-app/src/guis/GuiMenu.cpp | 33 +- es-app/src/guis/GuiMetaDataEd.cpp | 21 +- es-app/src/guis/GuiScraperSearch.cpp | 13 +- es-app/src/guis/GuiSettings.cpp | 34 +- es-app/src/views/ViewController.cpp | 62 +- es-app/src/views/ViewController.h | 1 - es-core/CMakeLists.txt | 4 +- es-core/src/Settings.cpp | 1 + es-core/src/guis/GuiComplexTextEditPopup.cpp | 155 ---- es-core/src/guis/GuiComplexTextEditPopup.h | 64 -- es-core/src/guis/GuiTextEditKeyboardPopup.cpp | 697 ++++++++++++++++++ es-core/src/guis/GuiTextEditKeyboardPopup.h | 112 +++ es-core/src/guis/GuiTextEditPopup.cpp | 214 +++++- es-core/src/guis/GuiTextEditPopup.h | 39 +- 16 files changed, 1182 insertions(+), 308 deletions(-) delete mode 100644 es-core/src/guis/GuiComplexTextEditPopup.cpp delete mode 100644 es-core/src/guis/GuiComplexTextEditPopup.h create mode 100644 es-core/src/guis/GuiTextEditKeyboardPopup.cpp create mode 100644 es-core/src/guis/GuiTextEditKeyboardPopup.h diff --git a/es-app/src/guis/GuiCollectionSystemsOptions.cpp b/es-app/src/guis/GuiCollectionSystemsOptions.cpp index 73c77b2fa..f02385551 100644 --- a/es-app/src/guis/GuiCollectionSystemsOptions.cpp +++ b/es-app/src/guis/GuiCollectionSystemsOptions.cpp @@ -14,6 +14,7 @@ #include "components/SwitchComponent.h" #include "guis/GuiMsgBox.h" #include "guis/GuiSettings.h" +#include "guis/GuiTextEditKeyboardPopup.h" #include "guis/GuiTextEditPopup.h" #include "utils/StringUtil.h" #include "views/ViewController.h" @@ -208,10 +209,21 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(Window* window, std::st window->removeGui(topGui); createCustomCollection(name); }; - row.makeAcceptInputHandler([this, createCollectionCall] { - mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), "New Collection Name", "", - createCollectionCall, false, "SAVE")); - }); + + if (Settings::getInstance()->getBool("VirtualKeyboard")) { + row.makeAcceptInputHandler([this, createCollectionCall] { + mWindow->pushGui(new GuiTextEditKeyboardPopup( + mWindow, getHelpStyle(), "New Collection Name", "", createCollectionCall, false, + "CREATE", "CREATE COLLECTION?")); + }); + } + else { + row.makeAcceptInputHandler([this, createCollectionCall] { + mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), "New Collection Name", + "", createCollectionCall, false, "CREATE", + "CREATE COLLECTION?")); + }); + } addRow(row); // Delete custom collection. diff --git a/es-app/src/guis/GuiGamelistFilter.cpp b/es-app/src/guis/GuiGamelistFilter.cpp index 61a7361c2..b861cf179 100644 --- a/es-app/src/guis/GuiGamelistFilter.cpp +++ b/es-app/src/guis/GuiGamelistFilter.cpp @@ -12,6 +12,7 @@ #include "SystemData.h" #include "components/OptionListComponent.h" +#include "guis/GuiTextEditKeyboardPopup.h" #include "guis/GuiTextEditPopup.h" #include "views/UIModeController.h" #include "views/ViewController.h" @@ -118,11 +119,20 @@ void GuiGamelistFilter::addFiltersToMenu() mFilterIndex->setTextFilter(Utils::String::toUpper(newVal)); }; - row.makeAcceptInputHandler([this, updateVal] { - mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), "TEXT FILTER (GAME NAME)", - mTextFilterField->getValue(), updateVal, false, "OK", - "APPLY CHANGES?")); - }); + if (Settings::getInstance()->getBool("VirtualKeyboard")) { + row.makeAcceptInputHandler([this, updateVal] { + mWindow->pushGui(new GuiTextEditKeyboardPopup( + mWindow, getHelpStyle(), "TEXT FILTER (GAME NAME)", mTextFilterField->getValue(), + updateVal, false, "OK", "APPLY CHANGES?")); + }); + } + else { + row.makeAcceptInputHandler([this, updateVal] { + mWindow->pushGui(new GuiTextEditPopup( + mWindow, getHelpStyle(), "TEXT FILTER (GAME NAME)", mTextFilterField->getValue(), + updateVal, false, "OK", "APPLY CHANGES?")); + }); + } mMenu.addRow(row); diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 27adc87c8..2aa0d742a 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -22,12 +22,13 @@ #include "components/SwitchComponent.h" #include "guis/GuiAlternativeEmulators.h" #include "guis/GuiCollectionSystemsOptions.h" -#include "guis/GuiComplexTextEditPopup.h" #include "guis/GuiDetectDevice.h" #include "guis/GuiMediaViewerOptions.h" #include "guis/GuiMsgBox.h" #include "guis/GuiScraperMenu.h" #include "guis/GuiScreensaverOptions.h" +#include "guis/GuiTextEditKeyboardPopup.h" +#include "guis/GuiTextEditPopup.h" #include "views/UIModeController.h" #include "views/ViewController.h" #include "views/gamelist/IGameListView.h" @@ -509,6 +510,18 @@ void GuiMenu::openUIOptions() } }); + // Enable virtual (on-screen) keyboard. + auto virtual_keyboard = std::make_shared(mWindow); + virtual_keyboard->setState(Settings::getInstance()->getBool("VirtualKeyboard")); + s->addWithLabel("ENABLE VIRTUAL KEYBOARD", virtual_keyboard); + s->addSaveFunc([virtual_keyboard, s] { + if (virtual_keyboard->getState() != Settings::getInstance()->getBool("VirtualKeyboard")) { + Settings::getInstance()->setBool("VirtualKeyboard", virtual_keyboard->getState()); + s->setNeedsSaving(); + s->setInvalidateCachedBackground(); + } + }); + // Enable the 'Y' button for tagging games as favorites. auto favorites_add_button = std::make_shared(mWindow); favorites_add_button->setState(Settings::getInstance()->getBool("FavoritesAddButton")); @@ -809,10 +822,20 @@ void GuiMenu::openOtherOptions() rowMediaDir.makeAcceptInputHandler([this, titleMediaDir, mediaDirectoryStaticText, defaultDirectoryText, initValueMediaDir, updateValMediaDir, multiLineMediaDir] { - mWindow->pushGui(new GuiComplexTextEditPopup( - mWindow, getHelpStyle(), titleMediaDir, mediaDirectoryStaticText, defaultDirectoryText, - Settings::getInstance()->getString("MediaDirectory"), updateValMediaDir, - multiLineMediaDir, "SAVE", "SAVE CHANGES?")); + if (Settings::getInstance()->getBool("VirtualKeyboard")) { + mWindow->pushGui(new GuiTextEditKeyboardPopup( + mWindow, getHelpStyle(), titleMediaDir, + Settings::getInstance()->getString("MediaDirectory"), updateValMediaDir, + multiLineMediaDir, "SAVE", "SAVE CHANGES?", mediaDirectoryStaticText, + defaultDirectoryText, "load default directory")); + } + else { + mWindow->pushGui(new GuiTextEditPopup( + mWindow, getHelpStyle(), titleMediaDir, + Settings::getInstance()->getString("MediaDirectory"), updateValMediaDir, + multiLineMediaDir, "SAVE", "SAVE CHANGES?", mediaDirectoryStaticText, + defaultDirectoryText, "load default directory")); + } }); s->addRow(rowMediaDir); diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index c5d4168a3..168bdbe24 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -23,9 +23,9 @@ #include "components/RatingComponent.h" #include "components/SwitchComponent.h" #include "components/TextComponent.h" -#include "guis/GuiComplexTextEditPopup.h" #include "guis/GuiGameScraper.h" #include "guis/GuiMsgBox.h" +#include "guis/GuiTextEditKeyboardPopup.h" #include "guis/GuiTextEditPopup.h" #include "resources/Font.h" #include "utils/StringUtil.h" @@ -364,11 +364,20 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, } }; - row.makeAcceptInputHandler([this, title, ed, updateVal, multiLine] { - mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), title, - ed->getValue(), updateVal, multiLine, - "APPLY", "APPLY CHANGES?")); - }); + if (Settings::getInstance()->getBool("VirtualKeyboard")) { + row.makeAcceptInputHandler([this, title, ed, updateVal, multiLine] { + mWindow->pushGui(new GuiTextEditKeyboardPopup( + mWindow, getHelpStyle(), title, ed->getValue(), updateVal, multiLine, + "apply", "APPLY CHANGES?", "", "")); + }); + } + else { + row.makeAcceptInputHandler([this, title, ed, updateVal, multiLine] { + mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), title, + ed->getValue(), updateVal, multiLine, + "APPLY", "APPLY CHANGES?")); + }); + } break; } } diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index e12edd803..2b50ffabb 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -29,6 +29,7 @@ #include "components/ScrollableContainer.h" #include "components/TextComponent.h" #include "guis/GuiMsgBox.h" +#include "guis/GuiTextEditKeyboardPopup.h" #include "guis/GuiTextEditPopup.h" #include "resources/Font.h" #include "utils/StringUtil.h" @@ -808,8 +809,16 @@ void GuiScraperSearch::openInputScreen(ScraperSearchParams& params) searchString = params.nameOverride; } - mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), "REFINE SEARCH", searchString, - searchForFunc, false, "SEARCH", "APPLY CHANGES?")); + if (Settings::getInstance()->getBool("VirtualKeyboard")) { + mWindow->pushGui(new GuiTextEditKeyboardPopup(mWindow, getHelpStyle(), "REFINE SEARCH", + searchString, searchForFunc, false, "SEARCH", + "SEARCH USING REFINED NAME?")); + } + else { + mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), "REFINE SEARCH", + searchString, searchForFunc, false, "SEARCH", + "SEARCH USING REFINED NAME?")); + } } bool GuiScraperSearch::saveMetadata(const ScraperSearchResult& result, diff --git a/es-app/src/guis/GuiSettings.cpp b/es-app/src/guis/GuiSettings.cpp index b5827febb..42a24c624 100644 --- a/es-app/src/guis/GuiSettings.cpp +++ b/es-app/src/guis/GuiSettings.cpp @@ -16,6 +16,7 @@ #include "SystemData.h" #include "Window.h" #include "components/HelpComponent.h" +#include "guis/GuiTextEditKeyboardPopup.h" #include "guis/GuiTextEditPopup.h" #include "views/ViewController.h" #include "views/gamelist/IGameListView.h" @@ -193,15 +194,30 @@ void GuiSettings::addEditableTextComponent(const std::string label, } }; - row.makeAcceptInputHandler([this, label, ed, updateVal, isPassword] { - // Never display the value if it's a password, instead set it to blank. - if (isPassword) - mWindow->pushGui( - new GuiTextEditPopup(mWindow, getHelpStyle(), label, "", updateVal, false)); - else - mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), label, ed->getValue(), - updateVal, false)); - }); + if (Settings::getInstance()->getBool("VirtualKeyboard")) { + row.makeAcceptInputHandler([this, label, ed, updateVal, isPassword] { + // Never display the value if it's a password, instead set it to blank. + if (isPassword) + mWindow->pushGui(new GuiTextEditKeyboardPopup( + mWindow, getHelpStyle(), label, "", updateVal, false, "SAVE", "SAVE CHANGES?")); + else + mWindow->pushGui(new GuiTextEditKeyboardPopup(mWindow, getHelpStyle(), label, + ed->getValue(), updateVal, false, + "SAVE", "SAVE CHANGES?")); + }); + } + else { + row.makeAcceptInputHandler([this, label, ed, updateVal, isPassword] { + if (isPassword) + mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), label, "", updateVal, + false, "SAVE", "SAVE CHANGES?")); + else + mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), label, + ed->getValue(), updateVal, false, "SAVE", + "SAVE CHANGES?")); + }); + } + assert(ed); addRow(row); diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 0227b92cb..376f70b15 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -26,6 +26,8 @@ #include "animations/MoveCameraAnimation.h" #include "guis/GuiInfoPopup.h" #include "guis/GuiMenu.h" +#include "guis/GuiTextEditKeyboardPopup.h" +#include "guis/GuiTextEditPopup.h" #include "views/SystemView.h" #include "views/UIModeController.h" #include "views/gamelist/DetailedGameListView.h" @@ -135,26 +137,52 @@ void ViewController::noGamesDialog() #else currentROMDirectory = FileData::getROMDirectory(); #endif - - mWindow->pushGui(new GuiComplexTextEditPopup( - mWindow, HelpStyle(), "ENTER ROM DIRECTORY PATH", - "Currently configured path:", currentROMDirectory, currentROMDirectory, - [this](const std::string& newROMDirectory) { - Settings::getInstance()->setString("ROMDirectory", newROMDirectory); - Settings::getInstance()->saveFile(); + if (Settings::getInstance()->getBool("VirtualKeyboard")) { + mWindow->pushGui(new GuiTextEditKeyboardPopup( + mWindow, HelpStyle(), "ENTER ROM DIRECTORY PATH", currentROMDirectory, + [this](const std::string& newROMDirectory) { + Settings::getInstance()->setString("ROMDirectory", newROMDirectory); + Settings::getInstance()->saveFile(); #if defined(_WIN64) - mRomDirectory = Utils::String::replace(FileData::getROMDirectory(), "/", "\\"); + mRomDirectory = + Utils::String::replace(FileData::getROMDirectory(), "/", "\\"); #else - mRomDirectory = FileData::getROMDirectory(); + mRomDirectory = FileData::getROMDirectory(); #endif - mNoGamesMessageBox->changeText(mNoGamesErrorMessage + mRomDirectory); - mWindow->pushGui(new GuiMsgBox(mWindow, HelpStyle(), - "ROM DIRECTORY SETTING SAVED, RESTART\n" - "THE APPLICATION TO RESCAN THE SYSTEMS", - "OK", nullptr, "", nullptr, "", nullptr, true)); - }, - false, "SAVE", "SAVE CHANGES?", "LOAD CURRENT", "LOAD CURRENTLY CONFIGURED VALUE", - "CLEAR", "CLEAR (LEAVE BLANK TO RESET TO DEFAULT DIRECTORY)", false)); + mNoGamesMessageBox->changeText(mNoGamesErrorMessage + mRomDirectory); + mWindow->pushGui(new GuiMsgBox(mWindow, HelpStyle(), + "ROM DIRECTORY SETTING SAVED, RESTART\n" + "THE APPLICATION TO RESCAN THE SYSTEMS", + "OK", nullptr, "", nullptr, "", nullptr, + true)); + }, + false, "SAVE", "SAVE CHANGES?", "Currently configured path:", + currentROMDirectory, "LOAD CURRENTLY CONFIGURED PATH", + "CLEAR (LEAVE BLANK TO RESET TO DEFAULT PATH)")); + } + else { + mWindow->pushGui(new GuiTextEditPopup( + mWindow, HelpStyle(), "ENTER ROM DIRECTORY PATH", currentROMDirectory, + [this](const std::string& newROMDirectory) { + Settings::getInstance()->setString("ROMDirectory", newROMDirectory); + Settings::getInstance()->saveFile(); +#if defined(_WIN64) + mRomDirectory = + Utils::String::replace(FileData::getROMDirectory(), "/", "\\"); +#else + mRomDirectory = FileData::getROMDirectory(); +#endif + mNoGamesMessageBox->changeText(mNoGamesErrorMessage + mRomDirectory); + mWindow->pushGui(new GuiMsgBox(mWindow, HelpStyle(), + "ROM DIRECTORY SETTING SAVED, RESTART\n" + "THE APPLICATION TO RESCAN THE SYSTEMS", + "OK", nullptr, "", nullptr, "", nullptr, + true)); + }, + false, "SAVE", "SAVE CHANGES?", "Currently configured path:", + currentROMDirectory, "LOAD CURRENTLY CONFIGURED PATH", + "CLEAR (LEAVE BLANK TO RESET TO DEFAULT PATH)")); + } }, "CREATE DIRECTORIES", [this] { diff --git a/es-app/src/views/ViewController.h b/es-app/src/views/ViewController.h index db08f2d85..69713ef12 100644 --- a/es-app/src/views/ViewController.h +++ b/es-app/src/views/ViewController.h @@ -15,7 +15,6 @@ #include "FileData.h" #include "GuiComponent.h" -#include "guis/GuiComplexTextEditPopup.h" #include "guis/GuiMsgBox.h" #include "renderers/Renderer.h" diff --git a/es-core/CMakeLists.txt b/es-core/CMakeLists.txt index fb1959b8a..43260823d 100644 --- a/es-core/CMakeLists.txt +++ b/es-core/CMakeLists.txt @@ -60,10 +60,10 @@ set(CORE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.h # GUIs - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiComplexTextEditPopup.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditKeyboardPopup.h ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.h # Renderers @@ -130,10 +130,10 @@ set(CORE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.cpp # GUIs - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiComplexTextEditPopup.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditKeyboardPopup.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.cpp # Renderer diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index 9e15920c6..c639c23a3 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -180,6 +180,7 @@ void Settings::setDefaults() mBoolMap["FavoritesStar"] = {true, true}; mBoolMap["SpecialCharsASCII"] = {false, false}; mBoolMap["ListScrollOverlay"] = {false, false}; + mBoolMap["VirtualKeyboard"] = {true, true}; mBoolMap["FavoritesAddButton"] = {true, true}; mBoolMap["RandomAddButton"] = {false, false}; mBoolMap["GamelistFilters"] = {true, true}; diff --git a/es-core/src/guis/GuiComplexTextEditPopup.cpp b/es-core/src/guis/GuiComplexTextEditPopup.cpp deleted file mode 100644 index 802f544ee..000000000 --- a/es-core/src/guis/GuiComplexTextEditPopup.cpp +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: MIT -// -// EmulationStation Desktop Edition -// GuiComplexTextEditPopup.cpp -// -// Text edit popup with a title, two text strings, a text input box and buttons -// to load the second text string and to clear the input field. -// Intended for updating settings for configuration files and similar. -// - -#include "guis/GuiComplexTextEditPopup.h" - -#include "Window.h" -#include "components/ButtonComponent.h" -#include "components/MenuComponent.h" -#include "components/TextEditComponent.h" -#include "guis/GuiMsgBox.h" - -GuiComplexTextEditPopup::GuiComplexTextEditPopup( - Window* window, - const HelpStyle& helpstyle, - const std::string& title, - const std::string& infoString1, - const std::string& infoString2, - const std::string& initValue, - const std::function& okCallback, - bool multiLine, - const std::string& acceptBtnText, - const std::string& saveConfirmationText, - const std::string& loadBtnText, - const std::string& loadBtnHelpText, - const std::string& clearBtnText, - const std::string& clearBtnHelpText, - bool hideCancelButton) - : GuiComponent(window) - , mHelpStyle(helpstyle) - , mBackground(window, ":/graphics/frame.svg") - , mGrid(window, glm::ivec2{1, 5}) - , mMultiLine(multiLine) - , mInitValue(initValue) - , mOkCallback(okCallback) - , mSaveConfirmationText(saveConfirmationText) - , mHideCancelButton(hideCancelButton) -{ - addChild(&mBackground); - addChild(&mGrid); - - mTitle = std::make_shared(mWindow, Utils::String::toUpper(title), - Font::get(FONT_SIZE_MEDIUM), 0x555555FF, ALIGN_CENTER); - mInfoString1 = std::make_shared(mWindow, infoString1, Font::get(FONT_SIZE_SMALL), - 0x555555FF, ALIGN_CENTER); - mInfoString2 = std::make_shared(mWindow, infoString2, Font::get(FONT_SIZE_SMALL), - 0x555555FF, ALIGN_CENTER); - - mText = std::make_shared(mWindow); - mText->setValue(initValue); - - std::vector> buttons; - buttons.push_back(std::make_shared(mWindow, acceptBtnText, acceptBtnText, - [this, okCallback] { - okCallback(mText->getValue()); - delete this; - })); - buttons.push_back(std::make_shared(mWindow, loadBtnText, loadBtnHelpText, - [this, infoString2] { - mText->setValue(infoString2); - mText->setCursor(0); - mText->setCursor(infoString2.size()); - })); - buttons.push_back(std::make_shared(mWindow, clearBtnText, clearBtnHelpText, - [this] { mText->setValue(""); })); - if (!mHideCancelButton) - buttons.push_back(std::make_shared(mWindow, "CANCEL", "discard changes", - [this] { delete this; })); - - mButtonGrid = makeButtonGrid(mWindow, buttons); - - mGrid.setEntry(mTitle, glm::ivec2{0, 0}, false, true); - mGrid.setEntry(mInfoString1, glm::ivec2{0, 1}, false, true); - mGrid.setEntry(mInfoString2, glm::ivec2{0, 2}, false, false); - mGrid.setEntry(mText, glm::ivec2{0, 3}, true, false, glm::ivec2{1, 1}, - GridFlags::BORDER_TOP | GridFlags::BORDER_BOTTOM); - mGrid.setEntry(mButtonGrid, glm::ivec2{0, 4}, true, false); - mGrid.setRowHeightPerc(1, 0.15f, true); - - float textHeight = mText->getFont()->getHeight(); - - if (multiLine) - textHeight *= 6.0f; - - // Adjust the width relative to the aspect ratio of the screen to make the GUI look coherent - // regardless of screen type. The 1.778 aspect ratio value is the 16:9 reference. - float aspectValue = 1.778f / Renderer::getScreenAspectRatio(); - float infoWidth = glm::clamp(0.70f * aspectValue, 0.60f, 0.85f) * Renderer::getScreenWidth(); - float windowWidth = glm::clamp(0.75f * aspectValue, 0.65f, 0.90f) * Renderer::getScreenWidth(); - - mText->setSize(0, textHeight); - mInfoString2->setSize(infoWidth, mInfoString2->getFont()->getHeight()); - - setSize(windowWidth, mTitle->getFont()->getHeight() + textHeight + mButtonGrid->getSize().y + - mButtonGrid->getSize().y * 1.85f); - setPosition((Renderer::getScreenWidth() - mSize.x) / 2.0f, - (Renderer::getScreenHeight() - mSize.y) / 2.0f); - mText->startEditing(); -} - -void GuiComplexTextEditPopup::onSizeChanged() -{ - mBackground.fitTo(mSize, glm::vec3{}, glm::vec2{-32.0f, -32.0f}); - mText->setSize(mSize.x - 40.0f, mText->getSize().y); - - // Update grid. - mGrid.setRowHeightPerc(0, mTitle->getFont()->getHeight() / mSize.y); - mGrid.setRowHeightPerc(2, mButtonGrid->getSize().y / mSize.y); - mGrid.setSize(mSize); -} - -bool GuiComplexTextEditPopup::input(InputConfig* config, Input input) -{ - if (GuiComponent::input(config, input)) - return true; - - if (!mHideCancelButton) { - // Pressing back when not text editing closes us. - if (config->isMappedTo("b", input) && input.value) { - if (mText->getValue() != mInitValue) { - // Changes were made, ask if the user wants to save them. - mWindow->pushGui(new GuiMsgBox( - mWindow, mHelpStyle, mSaveConfirmationText, "YES", - [this] { - this->mOkCallback(mText->getValue()); - delete this; - return true; - }, - "NO", - [this] { - delete this; - return false; - })); - } - else { - delete this; - } - } - } - return false; -} - -std::vector GuiComplexTextEditPopup::getHelpPrompts() -{ - std::vector prompts = mGrid.getHelpPrompts(); - if (!mHideCancelButton) - prompts.push_back(HelpPrompt("b", "back")); - return prompts; -} diff --git a/es-core/src/guis/GuiComplexTextEditPopup.h b/es-core/src/guis/GuiComplexTextEditPopup.h deleted file mode 100644 index a1ffc8e41..000000000 --- a/es-core/src/guis/GuiComplexTextEditPopup.h +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-License-Identifier: MIT -// -// EmulationStation Desktop Edition -// GuiComplexTextEditPopup.h -// -// Text edit popup with a title, two text strings, a text input box and buttons -// to load the second text string and to clear the input field. -// Intended for updating settings for configuration files and similar. -// - -#ifndef ES_CORE_GUIS_GUI_COMPLEX_TEXT_EDIT_POPUP_H -#define ES_CORE_GUIS_GUI_COMPLEX_TEXT_EDIT_POPUP_H - -#include "GuiComponent.h" -#include "components/ComponentGrid.h" -#include "components/NinePatchComponent.h" - -class TextComponent; -class TextEditComponent; - -class GuiComplexTextEditPopup : public GuiComponent -{ -public: - GuiComplexTextEditPopup(Window* window, - const HelpStyle& helpstyle, - const std::string& title, - const std::string& infoString1, - const std::string& infoString2, - const std::string& initValue, - const std::function& okCallback, - bool multiLine, - const std::string& acceptBtnText = "OK", - const std::string& saveConfirmationText = "SAVE CHANGES?", - const std::string& loadBtnText = "LOAD", - const std::string& loadBtnHelpText = "load default", - const std::string& clearBtnText = "CLEAR", - const std::string& clearBtnHelpText = "clear", - bool hideCancelButton = false); - - bool input(InputConfig* config, Input input) override; - void onSizeChanged() override; - - std::vector getHelpPrompts() override; - HelpStyle getHelpStyle() override { return mHelpStyle; } - -private: - NinePatchComponent mBackground; - ComponentGrid mGrid; - - std::shared_ptr mTitle; - std::shared_ptr mInfoString1; - std::shared_ptr mInfoString2; - std::shared_ptr mText; - std::shared_ptr mButtonGrid; - - HelpStyle mHelpStyle; - bool mMultiLine; - bool mHideCancelButton; - std::string mInitValue; - std::function mOkCallback; - std::string mSaveConfirmationText; -}; - -#endif // ES_CORE_GUIS_GUI_COMPLEX_TEXT_EDIT_POPUP_H diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp new file mode 100644 index 000000000..f163fc4a0 --- /dev/null +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp @@ -0,0 +1,697 @@ +// SPDX-License-Identifier: MIT +// +// EmulationStation Desktop Edition +// GuiTextEditKeyboardPopup.cpp +// +// Text edit popup with a virtual keyboard. +// Has a default mode and a complex mode, both with various options passed as arguments. +// + +#define KEYBOARD_WIDTH Renderer::getScreenWidth() * 0.78f +#define KEYBOARD_HEIGHT Renderer::getScreenHeight() * 0.60f + +#define KEYBOARD_PADDINGX (Renderer::getScreenWidth() * 0.02f) +#define KEYBOARD_PADDINGY (Renderer::getScreenWidth() * 0.01f) + +#define BUTTON_GRID_HORIZ_PADDING (10.0f * Renderer::getScreenHeightModifier()) + +#define NAVIGATION_REPEAT_START_DELAY 400 +#define NAVIGATION_REPEAT_SPEED 70 // Lower is faster. + +#define DELETE_REPEAT_START_DELAY 600 +#define DELETE_REPEAT_SPEED 90 // Lower is faster. + +#if defined(_MSC_VER) // MSVC compiler. +#define DELETE_SYMBOL Utils::String::wideStringToString(L"\uf177") +#define OK_SYMBOL Utils::String::wideStringToString(L"\uf058") +#define SHIFT_SYMBOL Utils::String::wideStringToString(L"\uf176") +#define ALT_SYMBOL Utils::String::wideStringToString(L"\uf141") +#else +#define DELETE_SYMBOL "\uf177" +#define OK_SYMBOL "\uf058" +#define SHIFT_SYMBOL "\uf176" +#define ALT_SYMBOL "\uf141" +#endif + +#include "guis/GuiTextEditKeyboardPopup.h" + +#include "components/MenuComponent.h" +#include "guis/GuiMsgBox.h" +#include "utils/StringUtil.h" + +// clang-format off +std::vector> kbBaseUS{ + {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "DEL"}, + {"!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+", "DEL"}, + {"¡", "²", "³", "¤", "€", "¼", "½", "¾", "‘", "’", "¥", "×", "DEL"}, + {"¹", "", "", "£", "", "", "", "", "", "", "", "÷", "DEL"}, + + {"q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "]", "OK"}, + {"Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "{", "}", "OK"}, + {"ä", "å", "é", "®", "þ", "ü", "ú", "í", "ó", "ö", "«", "»", "OK"}, + {"Ä", "Å", "É", "", "Þ", "Ü", "Ú", "Í", "Ó", "Ö", "", "", "OK"}, + + {"a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", "\\", "-rowspan-"}, + {"A", "S", "D", "F", "G", "H", "J", "K", "L", ":", "\"", "|", "-rowspan-"}, + {"á", "ß", "ð", "", "", "", "", "", "ø", "¶", "´", "¬", "-rowspan-"}, + {"Á", "§", "Ð", "", "", "", "", "", "Ø", "°", "¨", "¦", "-rowspan-"}, + + {"`", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "ALT", "-colspan-"}, + {"~", "Z", "X", "C", "V", "B", "N", "M", "<", ">", "?", "ALT", "-colspan-"}, + {"", "æ", "", "©", "", "", "ñ", "µ", "ç", "", "¿", "ALT", "-colspan-"}, + {"", "Æ", "", "¢", "", "", "Ñ", "Μ", "Ç", "", "", "ALT", "-colspan-"}}; + +std::vector> kbLastRowNormal{ + {"SHIFT", "-colspan-", "SPACE", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "CLEAR", "-colspan-", "CANCEL", "-colspan-"}, + {"SHIFT", "-colspan-", "SPACE", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "CLEAR", "-colspan-", "CANCEL", "-colspan-"}, + {"SHIFT", "-colspan-", "SPACE", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "CLEAR", "-colspan-", "CANCEL", "-colspan-"}, + {"SHIFT", "-colspan-", "SPACE", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "CLEAR", "-colspan-", "CANCEL", "-colspan-"}}; + +std::vector> kbLastRowLoad{ + {"SHIFT", "-colspan-", "SPACE", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "LOAD", "-colspan-", "CLEAR", "-colspan-", "CANCEL", "-colspan-"}, + {"SHIFT", "-colspan-", "SPACE", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "LOAD", "-colspan-", "CLEAR", "-colspan-", "CANCEL", "-colspan-"}, + {"SHIFT", "-colspan-", "SPACE", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "LOAD", "-colspan-", "CLEAR", "-colspan-", "CANCEL", "-colspan-"}, + {"SHIFT", "-colspan-", "SPACE", "-colspan-", "-colspan-", "-colspan-", "-colspan-", "LOAD", "-colspan-", "CLEAR", "-colspan-", "CANCEL", "-colspan-"}}; +// clang-format on + +GuiTextEditKeyboardPopup::GuiTextEditKeyboardPopup( + Window* window, + const HelpStyle& helpstyle, + const std::string& title, + const std::string& initValue, + const std::function& okCallback, + bool multiLine, + const std::string& acceptBtnHelpText, + const std::string& saveConfirmationText, + const std::string& infoString, + const std::string& defaultValue, + const std::string& loadBtnHelpText, + const std::string& clearBtnHelpText, + const std::string& cancelBtnHelpText) + : GuiComponent{window} + , mHelpStyle{helpstyle} + , mInitValue{initValue} + , mOkCallback{okCallback} + , mMultiLine{multiLine} + , mAcceptBtnHelpText{acceptBtnHelpText} + , mSaveConfirmationText{saveConfirmationText} + , mLoadBtnHelpText{loadBtnHelpText} + , mClearBtnHelpText{clearBtnHelpText} + , mCancelBtnHelpText{cancelBtnHelpText} + , mBackground{window, ":/graphics/frame.svg"} + , mGrid{window, glm::ivec2{1, (infoString != "" && defaultValue != "" ? 8 : 6)}} + , mComplexMode{(infoString != "" && defaultValue != "")} + , mDeleteRepeat{false} + , mShift{false} + , mAlt{false} + , mAltShift{false} + , mDeleteRepeatTimer{0} + , mNavigationRepeatTimer{0} + , mNavigationRepeatDirX{0} + , mNavigationRepeatDirY{0} +{ + addChild(&mBackground); + addChild(&mGrid); + + mTitle = std::make_shared(mWindow, Utils::String::toUpper(title), + Font::get(FONT_SIZE_LARGE), 0x555555FF, ALIGN_CENTER); + + std::vector> kbLayout; + + // At the moment there is only the US keyboard layout available. + kbLayout.insert(kbLayout.cend(), kbBaseUS.cbegin(), kbBaseUS.cend()); + + // In complex mode, the last row of the keyboard contains an additional "LOAD" button. + if (mComplexMode) + kbLayout.insert(kbLayout.cend(), kbLastRowLoad.cbegin(), kbLastRowLoad.cend()); + else + kbLayout.insert(kbLayout.cend(), kbLastRowNormal.cbegin(), kbLastRowNormal.cend()); + + mHorizontalKeyCount = static_cast(kbLayout[0].size()); + + mKeyboardGrid = std::make_shared( + mWindow, glm::ivec2(mHorizontalKeyCount, static_cast(kbLayout.size()) / 3)); + + mText = std::make_shared(mWindow); + mText->setValue(initValue); + + if (!multiLine) + mText->setCursor(initValue.size()); + + // Header. + mGrid.setEntry(mTitle, glm::ivec2{0, 0}, false, true); + + int yPos = 1; + + if (mComplexMode) { + mInfoString = std::make_shared( + mWindow, infoString, Font::get(FONT_SIZE_MEDIUM), 0x555555FF, ALIGN_CENTER); + mGrid.setEntry(mInfoString, glm::ivec2{0, yPos}, false, true); + + mDefaultValue = std::make_shared( + mWindow, defaultValue, Font::get(FONT_SIZE_SMALL), 0x555555FF, ALIGN_CENTER); + mGrid.setEntry(mDefaultValue, glm::ivec2{0, yPos + 1}, false, true); + yPos += 2; + } + + // Text edit field. + mGrid.setEntry(mText, glm::ivec2{0, yPos}, true, false, glm::ivec2{1, 1}, + GridFlags::BORDER_TOP); + + std::vector>> buttonList; + + // Create keyboard. + for (int i = 0; i < static_cast(kbLayout.size()) / 4; i++) { + std::vector> buttons; + + for (int j = 0; j < static_cast(kbLayout[i].size()); j++) { + std::string lower = kbLayout[4 * i][j]; + if (lower.empty() || lower == "-rowspan-" || lower == "-colspan-") + continue; + + std::string upper = kbLayout[4 * i + 1][j]; + std::string alted = kbLayout[4 * i + 2][j]; + std::string altshifted = kbLayout[4 * i + 3][j]; + + std::shared_ptr button = nullptr; + + if (lower == "DEL") { + lower = DELETE_SYMBOL; + upper = DELETE_SYMBOL; + alted = DELETE_SYMBOL; + altshifted = DELETE_SYMBOL; + } + else if (lower == "OK") { + lower = OK_SYMBOL; + upper = OK_SYMBOL; + alted = OK_SYMBOL; + altshifted = OK_SYMBOL; + } + else if (lower == "SPACE") { + lower = " "; + upper = " "; + alted = " "; + altshifted = " "; + } + else if (lower != "SHIFT" && lower.length() > 1) { + lower = (lower.c_str()); + upper = (upper.c_str()); + alted = (alted.c_str()); + altshifted = (altshifted.c_str()); + } + + if (lower == "SHIFT") { + mShiftButton = std::make_shared( + mWindow, (SHIFT_SYMBOL), ("SHIFT"), [this] { shiftKeys(); }, false, true); + button = mShiftButton; + } + else if (lower == "ALT") { + mAltButton = std::make_shared( + mWindow, (ALT_SYMBOL), ("ALT"), [this] { altKeys(); }, false, true); + button = mAltButton; + } + else { + button = makeButton(lower, upper, alted, altshifted); + } + + button->setPadding( + glm::vec4(BUTTON_GRID_HORIZ_PADDING / 4.0f, BUTTON_GRID_HORIZ_PADDING / 4.0f, + BUTTON_GRID_HORIZ_PADDING / 4.0f, BUTTON_GRID_HORIZ_PADDING / 4.0f)); + buttons.push_back(button); + + int colSpan = 1; + for (int cs = j + 1; cs < static_cast(kbLayout[i].size()); cs++) { + if (std::string(kbLayout[4 * i][cs]) == "-colspan-") + colSpan++; + else + break; + } + + int rowSpan = 1; + for (int cs = (4 * i) + 4; cs < static_cast(kbLayout.size()); cs += 4) { + if (std::string(kbLayout[cs][j]) == "-rowspan-") + rowSpan++; + else + break; + } + + mKeyboardGrid->setEntry(button, glm::ivec2{j, i}, true, true, + glm::ivec2{colSpan, rowSpan}); + + buttonList.push_back(buttons); + } + } + + mGrid.setEntry(mKeyboardGrid, glm::ivec2{0, yPos + 1}, true, true, glm::ivec2{2, 4}); + + float textHeight = mText->getFont()->getHeight(); + // If the multiLine option has been set, then include three lines of text on screen. + if (multiLine) { + textHeight *= 3.0f; + textHeight += 2.0f * Renderer::getScreenHeightModifier(); + } + + mText->setSize(0.0f, textHeight); + + // If attempting to navigate beyond the edge of the keyboard grid, then wrap around. + mGrid.setPastBoundaryCallback([this, kbLayout](InputConfig* config, Input input) -> bool { + if (config->isMappedLike("left", input)) { + if (mGrid.getSelectedComponent() == mKeyboardGrid) { + mKeyboardGrid->moveCursorTo(mHorizontalKeyCount - 1, -1, true); + return true; + } + } + else if (config->isMappedLike("right", input)) { + if (mGrid.getSelectedComponent() == mKeyboardGrid) { + mKeyboardGrid->moveCursorTo(0, -1); + return true; + } + } + return false; + }); + + // Adapt width to the geometry of the display. The 1.778 aspect ratio is the 16:9 reference. + float aspectValue = 1.778f / Renderer::getScreenAspectRatio(); + float width = glm::clamp(0.78f * aspectValue, 0.35f, 0.90f) * Renderer::getScreenWidth(); + + // The combination of multiLine and complex mode is not supported as there is currently + // no need for that. + if (mMultiLine) { + setSize(width, KEYBOARD_HEIGHT + textHeight - mText->getFont()->getHeight()); + + setPosition((static_cast(Renderer::getScreenWidth()) - mSize.x) / 2.0f, + (static_cast(Renderer::getScreenHeight()) - mSize.y) / 2.0f); + } + else { + if (mComplexMode) + setSize(width, KEYBOARD_HEIGHT + mDefaultValue->getSize().y * 3.0f); + else + setSize(width, KEYBOARD_HEIGHT); + + setPosition((static_cast(Renderer::getScreenWidth()) - mSize.x) / 2.0f, + (static_cast(Renderer::getScreenHeight()) - mSize.y) / 2.0f); + } +} + +void GuiTextEditKeyboardPopup::onSizeChanged() +{ + mBackground.fitTo(mSize, glm::vec3{}, glm::vec2{-32.0f, -32.0f}); + mText->setSize(mSize.x - KEYBOARD_PADDINGX - KEYBOARD_PADDINGX, mText->getSize().y); + + // Update grid. + mGrid.setRowHeightPerc(0, mTitle->getFont()->getHeight() / mSize.y); + + if (mInfoString && mDefaultValue) { + mGrid.setRowHeightPerc(1, (mInfoString->getSize().y * 0.6f) / mSize.y); + mGrid.setRowHeightPerc(2, (mDefaultValue->getSize().y * 1.6f) / mSize.y); + mGrid.setRowHeightPerc(1, (mText->getSize().y * 1.0f) / mSize.y); + } + else if (mMultiLine) { + mGrid.setRowHeightPerc(1, (mText->getSize().y * 1.15f) / mSize.y); + } + + mGrid.setSize(mSize); + + auto pos = mKeyboardGrid->getPosition(); + auto sz = mKeyboardGrid->getSize(); + + // Add a small margin between buttons. + mKeyboardGrid->setSize(mSize.x - KEYBOARD_PADDINGX - KEYBOARD_PADDINGX, + sz.y - KEYBOARD_PADDINGY + 70.0f * Renderer::getScreenHeightModifier()); + mKeyboardGrid->setPosition(KEYBOARD_PADDINGX, pos.y); +} + +bool GuiTextEditKeyboardPopup::input(InputConfig* config, Input input) +{ + // Enter/return key or numpad enter key accepts the changes. + if (config->getDeviceId() == DEVICE_KEYBOARD && mText->isEditing() && !mMultiLine && + input.value && (input.id == SDLK_RETURN || input.id == SDLK_KP_ENTER)) { + this->mOkCallback(mText->getValue()); + delete this; + return true; + } + // Dito for the A button if using a controller. + else if (config->getDeviceId() != DEVICE_KEYBOARD && mText->isEditing() && + config->isMappedTo("a", input) && input.value) { + this->mOkCallback(mText->getValue()); + delete this; + return true; + } + + // If the keyboard has been configured with backspace as the back button (which is the default + // configuration) then ignore this key if we're currently editing or otherwise it would be + // impossible to erase characters using this key. + bool keyboardBackspace = (config->getDeviceId() == DEVICE_KEYBOARD && mText->isEditing() && + input.id == SDLK_BACKSPACE); + + // Pressing back (or the escape key if using keyboard input) closes us. + if ((config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_ESCAPE) || + (!keyboardBackspace && config->isMappedTo("b", input)) && input.value) { + if (mText->getValue() != mInitValue) { + // Changes were made, ask if the user wants to save them. + mWindow->pushGui(new GuiMsgBox( + mWindow, mHelpStyle, mSaveConfirmationText, "YES", + [this] { + this->mOkCallback(mText->getValue()); + delete this; + return true; + }, + "NO", + [this] { + delete this; + return false; + })); + } + else { + delete this; + } + } + + if (mText->isEditing() && config->isMappedLike("down", input) && input.value) { + mText->stopEditing(); + mGrid.setCursorTo(mGrid.getSelectedComponent()); + } + + // Left trigger button outside text editing field toggles Shift key. + if (!mText->isEditing() && config->isMappedLike("lefttrigger", input) && input.value) + shiftKeys(); + + // Right trigger button outside text editing field toggles Alt key. + if (!mText->isEditing() && config->isMappedLike("righttrigger", input) && input.value) + altKeys(); + + // Left shoulder button deletes a character (backspace). + if (config->isMappedTo("leftshoulder", input)) { + if (input.value) { + mDeleteRepeat = true; + mDeleteRepeatTimer = -(DELETE_REPEAT_START_DELAY - DELETE_REPEAT_SPEED); + + bool editing = mText->isEditing(); + if (!editing) + mText->startEditing(); + + mText->textInput("\b"); + + if (!editing) + mText->stopEditing(); + } + else { + mDeleteRepeat = false; + } + return true; + } + + // Right shoulder button inserts a blank space. + if (config->isMappedTo("rightshoulder", input) && input.value) { + bool editing = mText->isEditing(); + if (!editing) + mText->startEditing(); + + mText->textInput(" "); + + if (!editing) + mText->stopEditing(); + + return true; + } + + // Actual navigation of the keyboard grid is done in ComponentGrid, this code only handles + // key repeat while holding the left/right/up/down buttons. + if (!mText->isEditing() && config->isMappedLike("left", input)) { + if (input.value) { + mNavigationRepeatDirX = -1; + mNavigationRepeatTimer = -(NAVIGATION_REPEAT_START_DELAY - NAVIGATION_REPEAT_SPEED); + } + else { + mNavigationRepeatDirX = 0; + } + } + + if (!mText->isEditing() && config->isMappedLike("right", input)) { + if (input.value) { + mNavigationRepeatDirX = 1; + mNavigationRepeatTimer = -(NAVIGATION_REPEAT_START_DELAY - NAVIGATION_REPEAT_SPEED); + } + else { + mNavigationRepeatDirX = 0; + } + } + + if (!mText->isEditing() && config->isMappedLike("up", input)) { + if (input.value) { + mNavigationRepeatDirY = -1; + mNavigationRepeatTimer = -(NAVIGATION_REPEAT_START_DELAY - NAVIGATION_REPEAT_SPEED); + } + else { + mNavigationRepeatDirY = 0; + } + } + + if (!mText->isEditing() && config->isMappedLike("down", input)) { + if (input.value) { + mNavigationRepeatDirY = 1; + mNavigationRepeatTimer = -(NAVIGATION_REPEAT_START_DELAY - NAVIGATION_REPEAT_SPEED); + } + else { + mNavigationRepeatDirY = 0; + } + } + + if (GuiComponent::input(config, input)) + return true; + + return false; +} + +void GuiTextEditKeyboardPopup::update(int deltaTime) +{ + updateNavigationRepeat(deltaTime); + updateDeleteRepeat(deltaTime); + GuiComponent::update(deltaTime); +} + +std::vector GuiTextEditKeyboardPopup::getHelpPrompts() +{ + std::vector prompts = mGrid.getHelpPrompts(); + + if (!mText->isEditing()) { + prompts.push_back(HelpPrompt("lt", "shift")); + prompts.push_back(HelpPrompt("rt", "alt")); + } + else { + prompts.push_back(HelpPrompt("a", mAcceptBtnHelpText)); + } + + prompts.push_back(HelpPrompt("l", "backspace")); + prompts.push_back(HelpPrompt("r", "space")); + prompts.push_back(HelpPrompt("b", "back")); + + if (prompts.size() > 0 && prompts.front().second == OK_SYMBOL) + prompts.front().second = mAcceptBtnHelpText; + + if (prompts.size() > 0 && prompts.front().second == " ") + prompts.front().second = "SPACE"; + + if (prompts.size() > 0 && prompts.front().second == "CLEAR") + prompts.front().second = mClearBtnHelpText; + + if (prompts.size() > 0 && prompts.front().second == "LOAD") + prompts.front().second = mLoadBtnHelpText; + + if (prompts.size() > 0 && prompts.front().second == "CANCEL") + prompts.front().second = mCancelBtnHelpText; + + // If a prompt has no value set, then remove it. + if (prompts.size() > 0 && prompts.front().second == "") + prompts.erase(prompts.begin(), prompts.begin() + 1); + + return prompts; +} + +void GuiTextEditKeyboardPopup::updateDeleteRepeat(int deltaTime) +{ + if (!mDeleteRepeat) + return; + + mDeleteRepeatTimer += deltaTime; + + while (mDeleteRepeatTimer >= DELETE_REPEAT_SPEED) { + bool editing = mText->isEditing(); + if (!editing) + mText->startEditing(); + + mText->textInput("\b"); + + if (!editing) + mText->stopEditing(); + + mDeleteRepeatTimer -= DELETE_REPEAT_SPEED; + } +} + +void GuiTextEditKeyboardPopup::updateNavigationRepeat(int deltaTime) +{ + if (mNavigationRepeatDirX == 0 && mNavigationRepeatDirY == 0) + return; + + mNavigationRepeatTimer += deltaTime; + + while (mNavigationRepeatTimer >= NAVIGATION_REPEAT_SPEED) { + + if (mNavigationRepeatDirX != 0) { + mKeyboardGrid.get()->moveCursor({mNavigationRepeatDirX, 0}); + // If replacing the line above with this code, the keyboard will wrap around the + // edges also when key repeat is active. + // if (!mKeyboardGrid.get()->moveCursor({mNavigationRepeatDirX, 0})) { + // if (mNavigationRepeatDirX < 0) + // mKeyboardGrid->moveCursorTo(mHorizontalKeyCount - 1, -1); + // else + // mKeyboardGrid->moveCursorTo(0, -1); + // } + } + + if (mNavigationRepeatDirY != 0) + mKeyboardGrid.get()->moveCursor({0, mNavigationRepeatDirY}); + + mNavigationRepeatTimer -= NAVIGATION_REPEAT_SPEED; + } +} + +void GuiTextEditKeyboardPopup::shiftKeys() +{ + mShift = !mShift; + + if (mShift) { + mShiftButton->setFlatColorFocused(0xFF2222FF); + mShiftButton->setFlatColorUnfocused(0xFF2222FF); + } + else { + mShiftButton->setFlatColorFocused(0x878787FF); + mShiftButton->setFlatColorUnfocused(0x60606025); + } + + if (mAlt && mShift) { + altShiftKeys(); + return; + } + + // This only happens when Alt was deselected while both Shift and Alt were active. + if (mAlt) { + altKeys(); + altKeys(); + } + else { + for (auto& kb : mKeyboardButtons) { + const std::string& text = mShift ? kb.shiftedKey : kb.key; + auto sz = kb.button->getSize(); + kb.button->setText(text, text, false); + kb.button->setSize(sz); + } + } +} + +void GuiTextEditKeyboardPopup::altKeys() +{ + mAlt = !mAlt; + + if (mAlt) { + mAltButton->setFlatColorFocused(0xFF2222FF); + mAltButton->setFlatColorUnfocused(0xFF2222FF); + } + else { + mAltButton->setFlatColorFocused(0x878787FF); + mAltButton->setFlatColorUnfocused(0x60606025); + } + + if (mShift && mAlt) { + altShiftKeys(); + return; + } + + // This only happens when Shift was deselected while both Shift and Alt were active. + if (mShift) { + shiftKeys(); + shiftKeys(); + } + else { + for (auto& kb : mKeyboardButtons) { + const std::string& text = mAlt ? kb.altedKey : kb.key; + auto sz = kb.button->getSize(); + kb.button->setText(text, text, false); + kb.button->setSize(sz); + } + } +} + +void GuiTextEditKeyboardPopup::altShiftKeys() +{ + for (auto& kb : mKeyboardButtons) { + const std::string& text = kb.altshiftedKey; + auto sz = kb.button->getSize(); + kb.button->setText(text, text, false); + kb.button->setSize(sz); + } +} + +std::shared_ptr GuiTextEditKeyboardPopup::makeButton( + const std::string& key, + const std::string& shiftedKey, + const std::string& altedKey, + const std::string& altshiftedKey) +{ + std::shared_ptr button = std::make_shared( + mWindow, key, key, + [this, key, shiftedKey, altedKey, altshiftedKey] { + if (key == (OK_SYMBOL) || key.find("OK") != std::string::npos) { + mOkCallback(mText->getValue()); + delete this; + return; + } + else if (key == (DELETE_SYMBOL) || key == "DEL") { + mText->startEditing(); + mText->textInput("\b"); + mText->stopEditing(); + return; + } + else if (key == "SPACE" || key == " ") { + mText->startEditing(); + mText->textInput(" "); + mText->stopEditing(); + return; + } + else if (key == "LOAD") { + mText->setValue(mDefaultValue->getValue()); + mText->setCursor(mDefaultValue->getValue().size()); + return; + } + else if (key == "CLEAR") { + mText->setValue(""); + return; + } + else if (key == "CANCEL") { + delete this; + return; + } + + if (mAlt && altedKey.empty()) + return; + + mText->startEditing(); + + if (mShift && mAlt) + mText->textInput(altshiftedKey.c_str()); + else if (mAlt) + mText->textInput(altedKey.c_str()); + else if (mShift) + mText->textInput(shiftedKey.c_str()); + else + mText->textInput(key.c_str()); + + mText->stopEditing(); + }, + false, true); + + KeyboardButton kb(button, key, shiftedKey, altedKey, altshiftedKey); + mKeyboardButtons.push_back(kb); + return button; +} diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.h b/es-core/src/guis/GuiTextEditKeyboardPopup.h new file mode 100644 index 000000000..1429a4292 --- /dev/null +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.h @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: MIT +// +// EmulationStation Desktop Edition +// GuiTextEditKeyboardPopup.h +// +// Text edit popup with a virtual keyboard. +// Has a default mode and a complex mode, both with various options passed as arguments. +// + +#ifndef ES_CORE_GUIS_GUI_TEXT_EDIT_KEYBOARD_POPUP_H +#define ES_CORE_GUIS_GUI_TEXT_EDIT_KEYBOARD_POPUP_H + +#include "GuiComponent.h" +#include "components/ButtonComponent.h" +#include "components/ComponentGrid.h" +#include "components/TextEditComponent.h" + +class GuiTextEditKeyboardPopup : public GuiComponent +{ +public: + GuiTextEditKeyboardPopup(Window* window, + const HelpStyle& helpstyle, + const std::string& title, + const std::string& initValue, + const std::function& okCallback, + bool multiLine, + const std::string& acceptBtnHelpText = "OK", + const std::string& saveConfirmationText = "SAVE CHANGES?", + const std::string& infoString = "", + const std::string& defaultValue = "", + const std::string& loadBtnHelpText = "LOAD DEFAULT", + const std::string& clearBtnHelpText = "CLEAR", + const std::string& cancelBtnHelpText = "DISCARD CHANGES"); + + void onSizeChanged(); + bool input(InputConfig* config, Input input); + void update(int deltaTime) override; + + std::vector getHelpPrompts() override; + HelpStyle getHelpStyle() override { return mHelpStyle; } + +private: + class KeyboardButton + { + public: + std::shared_ptr button; + const std::string key; + const std::string shiftedKey; + const std::string altedKey; + const std::string altshiftedKey; + KeyboardButton(const std::shared_ptr b, + const std::string& k, + const std::string& sk, + const std::string& ak, + const std::string& ask) + : button{b} + , key{k} + , shiftedKey{sk} + , altedKey{ak} + , altshiftedKey{ask} {}; + }; + + void updateDeleteRepeat(int deltaTime); + void updateNavigationRepeat(int deltaTime); + + void shiftKeys(); + void altKeys(); + void altShiftKeys(); + + std::shared_ptr makeButton(const std::string& key, + const std::string& shiftedKey, + const std::string& altedKey, + const std::string& altshiftedKey); + std::vector mKeyboardButtons; + + std::shared_ptr mShiftButton; + std::shared_ptr mAltButton; + + NinePatchComponent mBackground; + ComponentGrid mGrid; + HelpStyle mHelpStyle; + + std::shared_ptr mTitle; + std::shared_ptr mInfoString; + std::shared_ptr mDefaultValue; + std::shared_ptr mText; + std::shared_ptr mKeyboardGrid; + + std::string mInitValue; + std::string mAcceptBtnHelpText; + std::string mSaveConfirmationText; + std::string mLoadBtnHelpText; + std::string mClearBtnHelpText; + std::string mCancelBtnHelpText; + + std::function mOkCallback; + + bool mMultiLine; + bool mComplexMode; + bool mDeleteRepeat; + bool mShift; + bool mAlt; + bool mAltShift; + + int mHorizontalKeyCount; + int mDeleteRepeatTimer; + int mNavigationRepeatTimer; + int mNavigationRepeatDirX; + int mNavigationRepeatDirY; +}; + +#endif // ES_CORE_GUIS_GUI_TEXT_EDIT_KEYBOARD_POPUP_H diff --git a/es-core/src/guis/GuiTextEditPopup.cpp b/es-core/src/guis/GuiTextEditPopup.cpp index d5f832a7c..c84f7cd27 100644 --- a/es-core/src/guis/GuiTextEditPopup.cpp +++ b/es-core/src/guis/GuiTextEditPopup.cpp @@ -3,15 +3,16 @@ // EmulationStation Desktop Edition // GuiTextEditPopup.cpp // -// Simple text edit popup with a title, a text input box and OK and Cancel buttons. +// Text edit popup. +// Has a default mode and a complex mode, both with various options passed as arguments. // +#define DELETE_REPEAT_START_DELAY 600 +#define DELETE_REPEAT_SPEED 90 // Lower is faster. + #include "guis/GuiTextEditPopup.h" -#include "Window.h" -#include "components/ButtonComponent.h" #include "components/MenuComponent.h" -#include "components/TextEditComponent.h" #include "guis/GuiMsgBox.h" GuiTextEditPopup::GuiTextEditPopup(Window* window, @@ -21,15 +22,27 @@ GuiTextEditPopup::GuiTextEditPopup(Window* window, const std::function& okCallback, bool multiLine, const std::string& acceptBtnText, - const std::string& saveConfirmationText) - : GuiComponent(window) - , mHelpStyle(helpstyle) - , mBackground(window, ":/graphics/frame.svg") - , mGrid(window, glm::ivec2{1, 3}) - , mMultiLine(multiLine) - , mInitValue(initValue) - , mOkCallback(okCallback) - , mSaveConfirmationText(saveConfirmationText) + const std::string& saveConfirmationText, + const std::string& infoString, + const std::string& defaultValue, + const std::string& loadBtnHelpText, + const std::string& clearBtnHelpText, + const std::string& cancelBtnHelpText) + : GuiComponent{window} + , mHelpStyle{helpstyle} + , mInitValue{initValue} + , mOkCallback{okCallback} + , mMultiLine{multiLine} + , mAcceptBtnText{acceptBtnText} + , mSaveConfirmationText{saveConfirmationText} + , mLoadBtnHelpText{loadBtnHelpText} + , mClearBtnHelpText{clearBtnHelpText} + , mCancelBtnHelpText{cancelBtnHelpText} + , mBackground{window, ":/graphics/frame.svg"} + , mGrid{window, glm::ivec2{1, (infoString != "" && defaultValue != "" ? 5 : 3)}} + , mComplexMode{(infoString != "" && defaultValue != "")} + , mDeleteRepeat{false} + , mDeleteRepeatTimer{0} { addChild(&mBackground); addChild(&mGrid); @@ -37,6 +50,13 @@ GuiTextEditPopup::GuiTextEditPopup(Window* window, mTitle = std::make_shared(mWindow, Utils::String::toUpper(title), Font::get(FONT_SIZE_MEDIUM), 0x555555FF, ALIGN_CENTER); + if (mComplexMode) { + mInfoString = std::make_shared( + mWindow, infoString, Font::get(FONT_SIZE_SMALL), 0x555555FF, ALIGN_CENTER); + mDefaultValue = std::make_shared( + mWindow, defaultValue, Font::get(FONT_SIZE_SMALL), 0x555555FF, ALIGN_CENTER); + } + mText = std::make_shared(mWindow); mText->setValue(initValue); @@ -46,55 +66,116 @@ GuiTextEditPopup::GuiTextEditPopup(Window* window, okCallback(mText->getValue()); delete this; })); - buttons.push_back(std::make_shared(mWindow, "CLEAR", "clear", + if (mComplexMode) { + buttons.push_back(std::make_shared( + mWindow, "load", loadBtnHelpText, [this, defaultValue] { + mText->setValue(defaultValue); + mText->setCursor(0); + mText->setCursor(defaultValue.size()); + })); + } + + buttons.push_back(std::make_shared(mWindow, "clear", clearBtnHelpText, [this] { mText->setValue(""); })); + buttons.push_back(std::make_shared(mWindow, "CANCEL", "discard changes", [this] { delete this; })); mButtonGrid = makeButtonGrid(mWindow, buttons); mGrid.setEntry(mTitle, glm::ivec2{0, 0}, false, true); - mGrid.setEntry(mText, glm::ivec2{0, 1}, true, false, glm::ivec2{1, 1}, + + int yPos = 1; + + if (mComplexMode) { + mGrid.setEntry(mInfoString, glm::ivec2{0, yPos}, false, true); + mGrid.setEntry(mDefaultValue, glm::ivec2{0, yPos + 1}, false, false); + yPos += 2; + } + + mGrid.setEntry(mText, glm::ivec2{0, yPos}, true, false, glm::ivec2{1, 1}, GridFlags::BORDER_TOP | GridFlags::BORDER_BOTTOM); - mGrid.setEntry(mButtonGrid, glm::ivec2{0, 2}, true, false); + mGrid.setEntry(mButtonGrid, glm::ivec2{0, yPos + 1}, true, false); float textHeight = mText->getFont()->getHeight(); if (multiLine) textHeight *= 6.0f; + mText->setSize(0, textHeight); - // Adjust the width relative to the aspect ratio of the screen to make the GUI look coherent - // regardless of screen type. The 1.778 aspect ratio value is the 16:9 reference. + // Adapt width to the geometry of the display. The 1.778 aspect ratio is the 16:9 reference. float aspectValue = 1.778f / Renderer::getScreenAspectRatio(); - float width = glm::clamp(0.50f * aspectValue, 0.40f, 0.70f) * Renderer::getScreenWidth(); - setSize(width, mTitle->getFont()->getHeight() + textHeight + mButtonGrid->getSize().y + - mButtonGrid->getSize().y / 2.0f); - setPosition((Renderer::getScreenWidth() - mSize.x) / 2.0f, - (Renderer::getScreenHeight() - mSize.y) / 2.0f); + if (mComplexMode) { + float infoWidth = + glm::clamp(0.70f * aspectValue, 0.34f, 0.85f) * Renderer::getScreenWidth(); + float windowWidth = + glm::clamp(0.75f * aspectValue, 0.40f, 0.90f) * Renderer::getScreenWidth(); + + mDefaultValue->setSize(infoWidth, mDefaultValue->getFont()->getHeight()); + + setSize(windowWidth, mTitle->getFont()->getHeight() + textHeight + + mButtonGrid->getSize().y + mButtonGrid->getSize().y * 1.85f); + setPosition((Renderer::getScreenWidth() - mSize.x) / 2.0f, + (Renderer::getScreenHeight() - mSize.y) / 2.0f); + } + else { + float width = glm::clamp(0.54f * aspectValue, 0.20f, 0.70f) * Renderer::getScreenWidth(); + + setSize(width, mTitle->getFont()->getHeight() + textHeight + mButtonGrid->getSize().y + + mButtonGrid->getSize().y / 2.0f); + setPosition((Renderer::getScreenWidth() - mSize.x) / 2.0f, + (Renderer::getScreenHeight() - mSize.y) / 2.0f); + } + + if (!multiLine) + mText->setCursor(initValue.size()); + mText->startEditing(); } void GuiTextEditPopup::onSizeChanged() { mBackground.fitTo(mSize, glm::vec3{}, glm::vec2{-32.0f, -32.0f}); - - mText->setSize(mSize.x - 40.0f, mText->getSize().y); + mText->setSize(mSize.x - 40.0f * Renderer::getScreenHeightModifier(), mText->getSize().y); // Update grid. mGrid.setRowHeightPerc(0, mTitle->getFont()->getHeight() / mSize.y); + + if (mComplexMode) + mGrid.setRowHeightPerc(1, 0.15f); + mGrid.setRowHeightPerc(2, mButtonGrid->getSize().y / mSize.y); mGrid.setSize(mSize); } bool GuiTextEditPopup::input(InputConfig* config, Input input) { - if (GuiComponent::input(config, input)) + // Enter key (main key or via numpad) accepts the changes. + if (config->getDeviceId() == DEVICE_KEYBOARD && mText->isEditing() && !mMultiLine && + input.value && (input.id == SDLK_RETURN || input.id == SDLK_KP_ENTER)) { + this->mOkCallback(mText->getValue()); + delete this; return true; + } + // Dito for the A button if using a controller. + else if (config->getDeviceId() != DEVICE_KEYBOARD && mText->isEditing() && + config->isMappedTo("a", input) && input.value) { + this->mOkCallback(mText->getValue()); + delete this; + return true; + } - // Pressing back when not text editing closes us. - if (config->isMappedTo("b", input) && input.value) { + // If the keyboard has been configured with backspace as the back button (which is the default + // configuration) then ignore this key if we're currently editing or otherwise it would be + // impossible to erase characters using this key. + bool keyboardBackspace = (config->getDeviceId() == DEVICE_KEYBOARD && mText->isEditing() && + input.id == SDLK_BACKSPACE); + + // Pressing back (or the escape key if using keyboard input) closes us. + if ((config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_ESCAPE) || + (!keyboardBackspace && config->isMappedTo("b", input)) && input.value) { if (mText->getValue() != mInitValue) { // Changes were made, ask if the user wants to save them. mWindow->pushGui(new GuiMsgBox( @@ -114,12 +195,89 @@ bool GuiTextEditPopup::input(InputConfig* config, Input input) delete this; } } + + if (mText->isEditing() && config->isMappedLike("down", input) && input.value) { + mText->stopEditing(); + mGrid.setCursorTo(mGrid.getSelectedComponent()); + } + + // Left shoulder button deletes a character (backspace). + if (config->isMappedTo("leftshoulder", input)) { + if (input.value) { + mDeleteRepeat = true; + mDeleteRepeatTimer = -(DELETE_REPEAT_START_DELAY - DELETE_REPEAT_SPEED); + + bool editing = mText->isEditing(); + if (!editing) + mText->startEditing(); + + mText->textInput("\b"); + + if (!editing) + mText->stopEditing(); + } + else { + mDeleteRepeat = false; + } + return true; + } + + // Right shoulder button inserts a blank space. + if (config->isMappedTo("rightshoulder", input) && input.value) { + bool editing = mText->isEditing(); + if (!editing) + mText->startEditing(); + + mText->textInput(" "); + + if (!editing) + mText->stopEditing(); + + return true; + } + + if (GuiComponent::input(config, input)) + return true; + return false; } +void GuiTextEditPopup::update(int deltaTime) +{ + updateDeleteRepeat(deltaTime); + GuiComponent::update(deltaTime); +} + std::vector GuiTextEditPopup::getHelpPrompts() { std::vector prompts = mGrid.getHelpPrompts(); + + if (mText->isEditing()) + prompts.push_back(HelpPrompt("a", mAcceptBtnText)); + + prompts.push_back(HelpPrompt("l", "backspace")); + prompts.push_back(HelpPrompt("r", "space")); prompts.push_back(HelpPrompt("b", "back")); return prompts; } + +void GuiTextEditPopup::updateDeleteRepeat(int deltaTime) +{ + if (!mDeleteRepeat) + return; + + mDeleteRepeatTimer += deltaTime; + + while (mDeleteRepeatTimer >= DELETE_REPEAT_SPEED) { + bool editing = mText->isEditing(); + if (!editing) + mText->startEditing(); + + mText->textInput("\b"); + + if (!editing) + mText->stopEditing(); + + mDeleteRepeatTimer -= DELETE_REPEAT_SPEED; + } +} diff --git a/es-core/src/guis/GuiTextEditPopup.h b/es-core/src/guis/GuiTextEditPopup.h index fe07b53a4..a77623704 100644 --- a/es-core/src/guis/GuiTextEditPopup.h +++ b/es-core/src/guis/GuiTextEditPopup.h @@ -3,18 +3,17 @@ // EmulationStation Desktop Edition // GuiTextEditPopup.h // -// Simple text edit popup with a title, a text input box and OK and Cancel buttons. +// Text edit popup. +// Has a default mode and a complex mode, both with various options passed as arguments. // #ifndef ES_CORE_GUIS_GUI_TEXT_EDIT_POPUP_H #define ES_CORE_GUIS_GUI_TEXT_EDIT_POPUP_H #include "GuiComponent.h" +#include "components/ButtonComponent.h" #include "components/ComponentGrid.h" -#include "components/NinePatchComponent.h" - -class TextComponent; -class TextEditComponent; +#include "components/TextEditComponent.h" class GuiTextEditPopup : public GuiComponent { @@ -26,27 +25,47 @@ public: const std::function& okCallback, bool multiLine, const std::string& acceptBtnText = "OK", - const std::string& saveConfirmationText = "SAVE CHANGES?"); + const std::string& saveConfirmationText = "SAVE CHANGES?", + const std::string& infoString = "", + const std::string& defaultValue = "", + const std::string& loadBtnHelpText = "LOAD DEFAULT", + const std::string& clearBtnHelpText = "CLEAR", + const std::string& cancelBtnHelpText = "DISCARD CHANGES"); - bool input(InputConfig* config, Input input) override; void onSizeChanged() override; + bool input(InputConfig* config, Input input) override; + void update(int deltaTime) override; std::vector getHelpPrompts() override; HelpStyle getHelpStyle() override { return mHelpStyle; } private: + void updateDeleteRepeat(int deltaTime); + NinePatchComponent mBackground; ComponentGrid mGrid; + HelpStyle mHelpStyle; std::shared_ptr mTitle; + std::shared_ptr mInfoString; + std::shared_ptr mDefaultValue; std::shared_ptr mText; std::shared_ptr mButtonGrid; - HelpStyle mHelpStyle; - bool mMultiLine; std::string mInitValue; - std::function mOkCallback; + std::string mAcceptBtnText; std::string mSaveConfirmationText; + std::string mLoadBtnHelpText; + std::string mClearBtnHelpText; + std::string mCancelBtnHelpText; + + std::function mOkCallback; + + bool mMultiLine; + bool mComplexMode; + bool mDeleteRepeat; + + int mDeleteRepeatTimer; }; #endif // ES_CORE_GUIS_GUI_TEXT_EDIT_POPUP_H From f840e93fc9331e0f6923dcc9ca1c51b796e4f5a3 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 17 Sep 2021 22:53:00 +0200 Subject: [PATCH 16/64] Fixed an issue where closing an entry in the metadata editor could lead to a crash. --- es-core/src/guis/GuiTextEditKeyboardPopup.cpp | 3 ++- es-core/src/guis/GuiTextEditPopup.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp index f163fc4a0..6b1a08f95 100644 --- a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp @@ -359,11 +359,12 @@ bool GuiTextEditKeyboardPopup::input(InputConfig* config, Input input) "NO", [this] { delete this; - return false; + return true; })); } else { delete this; + return true; } } diff --git a/es-core/src/guis/GuiTextEditPopup.cpp b/es-core/src/guis/GuiTextEditPopup.cpp index c84f7cd27..38e2a483a 100644 --- a/es-core/src/guis/GuiTextEditPopup.cpp +++ b/es-core/src/guis/GuiTextEditPopup.cpp @@ -188,11 +188,12 @@ bool GuiTextEditPopup::input(InputConfig* config, Input input) "NO", [this] { delete this; - return false; + return true; })); } else { delete this; + return true; } } From 94eb34a5cf02450e76afdfa98eabf6e54c55c14c Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 17 Sep 2021 23:42:43 +0200 Subject: [PATCH 17/64] Documentation update. --- CHANGELOG.md | 8 ++++++++ CONTRIBUTING.md | 9 +++++---- CREDITS.md | 14 ++++++++++++-- THEMES-DEV.md | 2 ++ USERGUIDE-DEV.md | 10 ++++++++-- 5 files changed, 35 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94579c16e..8bb7b09a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,20 +11,26 @@ ### 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 +* 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 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 * Removed the "Choose" entry from the help prompts in the gamelist view * Changed the "Toggle screensaver" help entry in the system view to simply "Screensaver" * Added support for upscaling bitmap images using linear filtering * Changed the marquee image upscale filtering from nearest neighbor to linear for the launch screen and the gamelist views * Moved the Media Viewer and Screensaver settings higher in the UI Settings menu * 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 +* 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 * Added the GLM (OpenGL Mathematics) library as a Git subtree * Replaced all built-in matrix and vector data types and functions with GLM library equivalents * 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 * Changed two clang-format rules related to braced lists and reformatted the codebase * Changed the language standard from C++14 to C++17 @@ -32,6 +38,8 @@ * When navigating menus, the separator lines and menu components did not align properly and moved up and down slightly * With the menu scale-up effect enabled and entering a submenu before the parent menu was completely scaled up, the parent would get stuck at a semi-scaled size +* Horizontal sizing of the TextComponent input field was not consistent across different screen resolutions +* The "sortname" window header was incorrectly spelled when editing this type of entry in the metadata editor * When the last row of a menu had its text color changed, this color was completely desaturated when navigating to a button below the list ## Version 1.1.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b2407e56c..45d8f5725 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,8 +31,8 @@ This plan is under constant review so expect it to change from time to time. Sti * Support for pre-defined alternative emulators and cores (configured in es_systems.xml) * Badges highlighting things like favorite games, completed games etc. (will require theme support) * Improved full-screen support, removing the temporary full-screen hacks -* On-screen keyboard -* Support for the Raspberry Pi 4 with OpenGL ES 2.0 and GLSL shaders (Raspberry Pi OS) +* Virtual (on-screen) keyboard +* Support for the Raspberry Pi 4 (Raspberry Pi OS) * Add GLM library dependency for matrix and vector operations, decommission the built-in functions * Add to more Linux repositories, BSD ports collections etc. * Flatpak and Snap releases on Linux @@ -40,8 +40,9 @@ This plan is under constant review so expect it to change from time to time. Sti #### v1.3 * Localization/multi-language support -* Overhaul of the theme handling, adding capabilities and improving compatibility with Recalbox and Batocera themes -* Scrapping the Grid view style and adding a general grid/wall component instead +* New theme engine with generalized views (only System and Gamelist) and theme variants support +* Add multiple new gamelist components (wheels, wall/grid etc.) +* Move existing theme logic to legacy support, only to be used for backwards compatibility * Checksum support for the scraper for exact searches and for determining when to overwrite files * Improved text and font functions, e.g. faster and cleaner line wrapping and more exact sizing diff --git a/CREDITS.md b/CREDITS.md index da8a9e873..60cac7b99 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -11,8 +11,6 @@ https://retropie.org.uk Leon Styhre (Desktop Edition fork, based on the RetroPie version) \ https://gitlab.com/leonstyhre/emulationstation-de -The shader code for blur_horizontal.glsl, blur_vertical_glsl and scanlines.glsl has been borrowed from the [RetroArch](https://www.retroarch.com) project. - # UI Art & Design @@ -63,6 +61,18 @@ SDL \ https://www.libsdl.org +# Code + +Some code (like the virtual keyboard) was borrowed from Batocera.linux \ +https://batocera.org + +The MD5 hash functions were adapted from code by the BZFlag project \ +https://www.bzflag.org + +A few of the GLSL shaders were borrowed from the RetroArch project \ +https://www.retroarch.com + + # Resources Akrobat font \ diff --git a/THEMES-DEV.md b/THEMES-DEV.md index a42c00152..7359ef622 100644 --- a/THEMES-DEV.md +++ b/THEMES-DEV.md @@ -884,6 +884,8 @@ EmulationStation borrows the concept of "nine patches" from Android (or "9-Slice `button_l`, `button_r`, `button_lr`, + `button_lt`, + `button_rt`, `button_a_SNES`, `button_b_SNES`, `button_x_SNES`, diff --git a/USERGUIDE-DEV.md b/USERGUIDE-DEV.md index b0e689e42..122b7fec9 100644 --- a/USERGUIDE-DEV.md +++ b/USERGUIDE-DEV.md @@ -132,9 +132,11 @@ _This is the dialog shown if no game files were found. It lets you configure the 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`. -Although it's possible to make a copy of the bundled configuration file, to modify it and then place it in this directory, that is not how the system customization is designed to be done. Instead the intention is that the file in the custom_systems directory complements the bundled configuration. This means that only systems that are to be modified should be included. 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. As well, future updates to ES-DE may contain changes to existing emulator entries which would then not be utilized as the custom configuration file takes precedence over the bundled file. +Although it's possible to make a copy of the bundled configuration file, to modify it and then place it in this directory, that is not how the system customization is designed to be done. Instead the intention is that the file in the custom_systems directory complements the bundled configuration, meaning only systems that are to be modified should be included. -It's also possible to skip the loading of the bundled es_systems.xml file and only use the file in custom_systems, although this will probably rarely be needed. The instructions for how to accomplish this as well as how to customize the es_systems.xml file can be found in [INSTALL-DEV.md](INSTALL-DEV.md#es_systemsxml). +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. ## Migrating from other EmulationStation forks @@ -952,6 +954,10 @@ There are some special characters in ES-DE such as the favorites star, the folde With this option enabled, there will be an overlay displayed when scrolling the gamelists quickly, i.e. when holding down the _Up_, _Down_, _Left shoulder_ or _Right shoulder_ buttons for some time. The overlay will darken the background slightly and display the first two characters of the game names. If the game is a favorite and the setting to sort favorites above non-favorites has been enabled, a star will be shown instead. +**Enable virtual keyboard** + +This enables a virtual (on-screen) keyboard that can be used at various places throughout the application to input text and numbers using a controller. The Shift and Alt keys can be toggled individually or combined together to access many special characters. The general use of the virtual keyboard should hopefully be self-explanatory, + **Enable toggle favorites button** This setting enables the _Y_ button for quickly toggling a game as favorite. Although this may be convenient at times, it's also quite easy to accidentally remove a favorite tagging of a game when using the application more casually. As such it could sometimes make sense to disable this functionality. It's of course still possible to mark a game as favorite using the metadata editor when this setting is disabled. The option does not affect the use of the _Y_ button to add or remove games when editing custom collections. From 9ae62cca4dc25baacc278432565238f83688cab4 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 18 Sep 2021 00:26:39 +0200 Subject: [PATCH 18/64] Fixed two Clang warnings. --- es-core/src/guis/GuiTextEditKeyboardPopup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.h b/es-core/src/guis/GuiTextEditKeyboardPopup.h index 1429a4292..e57d17134 100644 --- a/es-core/src/guis/GuiTextEditKeyboardPopup.h +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.h @@ -32,8 +32,8 @@ public: const std::string& clearBtnHelpText = "CLEAR", const std::string& cancelBtnHelpText = "DISCARD CHANGES"); - void onSizeChanged(); - bool input(InputConfig* config, Input input); + void onSizeChanged() override; + bool input(InputConfig* config, Input input) override; void update(int deltaTime) override; std::vector getHelpPrompts() override; From 0b6d987263c211b1d5453dbf9533e98ade58fd88 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 18 Sep 2021 09:53:26 +0200 Subject: [PATCH 19/64] Fixed lots of compiler warnings reported by the -Wall and -Wpedantic flags. --- es-app/src/FileData.cpp | 11 +++++------ es-app/src/FileFilterIndex.cpp | 2 +- es-app/src/FileSorts.cpp | 2 +- es-app/src/FileSorts.h | 2 +- es-app/src/SystemData.h | 11 ++++++----- es-app/src/guis/GuiGameScraper.cpp | 2 +- es-app/src/guis/GuiGamelistOptions.cpp | 2 +- es-app/src/guis/GuiLaunchScreen.cpp | 3 +-- es-app/src/guis/GuiLaunchScreen.h | 2 +- es-app/src/guis/GuiMetaDataEd.cpp | 3 +-- es-app/src/guis/GuiOfflineGenerator.cpp | 2 +- es-app/src/guis/GuiScraperSearch.cpp | 4 ++-- es-app/src/guis/GuiSettings.cpp | 2 +- es-app/src/scrapers/Scraper.cpp | 4 ++-- es-app/src/views/SystemView.cpp | 3 +-- es-app/src/views/ViewController.cpp | 4 ++-- .../src/views/gamelist/DetailedGameListView.cpp | 6 +++--- es-app/src/views/gamelist/GridGameListView.cpp | 6 +++--- es-app/src/views/gamelist/GridGameListView.h | 5 +++-- es-app/src/views/gamelist/VideoGameListView.cpp | 8 ++++---- es-app/src/views/gamelist/VideoGameListView.h | 2 +- es-core/src/GuiComponent.cpp | 6 +++--- es-core/src/GuiComponent.h | 10 +++++----- es-core/src/HttpReq.h | 2 +- es-core/src/Settings.cpp | 8 ++++---- es-core/src/Window.cpp | 8 ++++---- es-core/src/Window.h | 16 ++++++++-------- es-core/src/animations/MoveCameraAnimation.h | 2 +- es-core/src/components/ComponentGrid.h | 2 +- es-core/src/components/DateTimeEditComponent.cpp | 2 +- es-core/src/components/GridTileComponent.cpp | 2 +- es-core/src/components/ImageComponent.cpp | 12 ++++++------ es-core/src/components/ImageComponent.h | 5 ++++- es-core/src/components/NinePatchComponent.cpp | 4 ++-- es-core/src/components/OptionListComponent.h | 2 +- es-core/src/components/RatingComponent.cpp | 4 ++-- es-core/src/components/ScrollableContainer.cpp | 6 +++--- es-core/src/components/TextComponent.cpp | 16 ++++++++-------- es-core/src/components/TextEditComponent.cpp | 10 +++++----- es-core/src/components/VideoComponent.cpp | 8 ++++---- es-core/src/components/VideoComponent.h | 3 ++- es-core/src/components/VideoFFmpegComponent.cpp | 2 +- es-core/src/components/VideoVlcComponent.cpp | 2 +- es-core/src/guis/GuiMsgBox.cpp | 2 +- es-core/src/guis/GuiTextEditKeyboardPopup.cpp | 10 +++++----- es-core/src/guis/GuiTextEditPopup.cpp | 10 +++++----- es-core/src/renderers/Renderer.cpp | 2 +- es-core/src/resources/ResourceManager.cpp | 1 - es-core/src/resources/TextureData.cpp | 6 +++--- es-core/src/utils/FileSystemUtil.cpp | 2 +- 50 files changed, 126 insertions(+), 125 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 897992cbf..4f9d88a19 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -33,16 +33,15 @@ FileData::FileData(FileType type, const std::string& path, SystemEnvironmentData* envData, SystemData* system) - : mType(type) - , mPath(path) - , mSystem(system) - , mEnvData(envData) + : metadata(type == GAME ? GAME_METADATA : FOLDER_METADATA) , mSourceFileData(nullptr) , mParent(nullptr) + , mType(type) + , mPath(path) + , mEnvData(envData) + , mSystem(system) , mOnlyFolders(false) , mDeletionFlag(false) - // Metadata is set in the constructor. - , metadata(type == GAME ? GAME_METADATA : FOLDER_METADATA) { // Metadata needs at least a name field (since that's what getName() will return). if (metadata.get("name").empty()) { diff --git a/es-app/src/FileFilterIndex.cpp b/es-app/src/FileFilterIndex.cpp index cb8afb7e3..b4cb21de3 100644 --- a/es-app/src/FileFilterIndex.cpp +++ b/es-app/src/FileFilterIndex.cpp @@ -279,7 +279,7 @@ void FileFilterIndex::setTextFilter(std::string textFilter) mFilterByText = false; else mFilterByText = true; -}; +} void FileFilterIndex::clearAllFilters() { diff --git a/es-app/src/FileSorts.cpp b/es-app/src/FileSorts.cpp index 84479b8f3..916ecd819 100644 --- a/es-app/src/FileSorts.cpp +++ b/es-app/src/FileSorts.cpp @@ -234,4 +234,4 @@ namespace FileSorts return system1.compare(system2) > 0; } -}; // namespace FileSorts +} // namespace FileSorts diff --git a/es-app/src/FileSorts.h b/es-app/src/FileSorts.h index 28b0fcd6a..e7f84346d 100644 --- a/es-app/src/FileSorts.h +++ b/es-app/src/FileSorts.h @@ -38,6 +38,6 @@ namespace FileSorts bool compareSystemDescending(const FileData* file1, const FileData* file2); extern const std::vector SortTypes; -}; // namespace FileSorts +} // namespace FileSorts #endif // ES_APP_FILE_SORTS_H diff --git a/es-app/src/SystemData.h b/es-app/src/SystemData.h index 63691ed92..d6bd4de37 100644 --- a/es-app/src/SystemData.h +++ b/es-app/src/SystemData.h @@ -149,11 +149,6 @@ public: void setupSystemSortType(FileData* mRootFolder); private: - bool mIsCollectionSystem; - bool mIsCustomCollectionSystem; - bool mIsGroupedCustomCollectionSystem; - bool mIsGameSystem; - bool mScrapeFlag; // Only used by scraper GUI to remember which systems to scrape. std::string mName; std::string mFullName; SystemEnvironmentData* mEnvData; @@ -161,6 +156,12 @@ private: std::string mThemeFolder; std::shared_ptr mTheme; + bool mIsCollectionSystem; + bool mIsCustomCollectionSystem; + bool mIsGroupedCustomCollectionSystem; + bool mIsGameSystem; + bool mScrapeFlag; // Only used by scraper GUI to remember which systems to scrape. + bool populateFolder(FileData* folder); void indexAllGameFilters(const FileData* folder); void setIsGameSystemStatus(); diff --git a/es-app/src/guis/GuiGameScraper.cpp b/es-app/src/guis/GuiGameScraper.cpp index 9c2a2e59d..9ddc85caa 100644 --- a/es-app/src/guis/GuiGameScraper.cpp +++ b/es-app/src/guis/GuiGameScraper.cpp @@ -22,10 +22,10 @@ GuiGameScraper::GuiGameScraper(Window* window, ScraperSearchParams params, std::function doneFunc) : GuiComponent(window) + , mClose(false) , mGrid(window, glm::ivec2{1, 7}) , mBox(window, ":/graphics/frame.svg") , mSearchParams(params) - , mClose(false) { addChild(&mBox); addChild(&mGrid); diff --git a/es-app/src/guis/GuiGamelistOptions.cpp b/es-app/src/guis/GuiGamelistOptions.cpp index 9c6a5f87e..b7cbbd1cb 100644 --- a/es-app/src/guis/GuiGamelistOptions.cpp +++ b/es-app/src/guis/GuiGamelistOptions.cpp @@ -27,8 +27,8 @@ GuiGamelistOptions::GuiGamelistOptions(Window* window, SystemData* system) : GuiComponent(window) - , mSystem(system) , mMenu(window, "OPTIONS") + , mSystem(system) , mFiltersChanged(false) , mCancelled(false) , mIsCustomCollection(false) diff --git a/es-app/src/guis/GuiLaunchScreen.cpp b/es-app/src/guis/GuiLaunchScreen.cpp index 3dbf7089e..1b29bd8fe 100644 --- a/es-app/src/guis/GuiLaunchScreen.cpp +++ b/es-app/src/guis/GuiLaunchScreen.cpp @@ -16,10 +16,10 @@ GuiLaunchScreen::GuiLaunchScreen(Window* window) : GuiComponent(window) + , mWindow(window) , mBackground(window, ":/graphics/frame.svg") , mGrid(nullptr) , mMarquee(nullptr) - , mWindow(window) { addChild(&mBackground); mWindow->setLaunchScreen(this); @@ -169,7 +169,6 @@ void GuiLaunchScreen::displayLaunchScreen(FileData* game) mMarquee->setOrigin(0.5f, 0.5f); glm::vec3 currentPos{mMarquee->getPosition()}; - glm::vec2 currentSize{mMarquee->getSize()}; // Position the image in the middle of row four. currentPos.x = mSize.x / 2.0f; diff --git a/es-app/src/guis/GuiLaunchScreen.h b/es-app/src/guis/GuiLaunchScreen.h index d7572a7e4..1301c25bf 100644 --- a/es-app/src/guis/GuiLaunchScreen.h +++ b/es-app/src/guis/GuiLaunchScreen.h @@ -34,8 +34,8 @@ public: private: Window* mWindow; - ComponentGrid* mGrid; NinePatchComponent mBackground; + ComponentGrid* mGrid; std::shared_ptr mTitle; std::shared_ptr mGameName; diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index 168bdbe24..cf53d98ed 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -40,9 +40,9 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, std::function clearGameFunc, std::function deleteGameFunc) : GuiComponent(window) - , mScraperParams(scraperParams) , mBackground(window, ":/graphics/frame.svg") , mGrid(window, glm::ivec2{1, 3}) + , mScraperParams(scraperParams) , mMetaDataDecl(mdd) , mMetaData(md) , mSavedCallback(saveCallback) @@ -188,7 +188,6 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, bracket->setResize(glm::vec2{0.0f, lbl->getFont()->getLetterHeight()}); row.addElement(bracket, false); - bool multiLine = false; const std::string title = iter->displayPrompt; // OK callback (apply new value to ed). diff --git a/es-app/src/guis/GuiOfflineGenerator.cpp b/es-app/src/guis/GuiOfflineGenerator.cpp index 4bd6f84b8..d88e67932 100644 --- a/es-app/src/guis/GuiOfflineGenerator.cpp +++ b/es-app/src/guis/GuiOfflineGenerator.cpp @@ -15,9 +15,9 @@ GuiOfflineGenerator::GuiOfflineGenerator(Window* window, const std::queue& gameQueue) : GuiComponent(window) + , mGameQueue(gameQueue) , mBackground(window, ":/graphics/frame.svg") , mGrid(window, glm::ivec2{6, 13}) - , mGameQueue(gameQueue) { addChild(&mBackground); addChild(&mGrid); diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index 2b50ffabb..5221820b6 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -40,12 +40,12 @@ GuiScraperSearch::GuiScraperSearch(Window* window, SearchType type, unsigned int scrapeCount) : GuiComponent(window) , mGrid(window, glm::ivec2{4, 3}) - , mBusyAnim(window) , mSearchType(type) , mScrapeCount(scrapeCount) - , mScrapeRatings(false) , mRefinedSearch(false) , mFoundGame(false) + , mScrapeRatings(false) + , mBusyAnim(window) { addChild(&mGrid); diff --git a/es-app/src/guis/GuiSettings.cpp b/es-app/src/guis/GuiSettings.cpp index 42a24c624..53cc3e2f9 100644 --- a/es-app/src/guis/GuiSettings.cpp +++ b/es-app/src/guis/GuiSettings.cpp @@ -24,6 +24,7 @@ GuiSettings::GuiSettings(Window* window, std::string title) : GuiComponent(window) , mMenu(window, title) + , mGoToSystem(nullptr) , mNeedsSaving(false) , mNeedsReloadHelpPrompts(false) , mNeedsCollectionsUpdate(false) @@ -35,7 +36,6 @@ GuiSettings::GuiSettings(Window* window, std::string title) , mNeedsGoToSystem(false) , mNeedsGoToGroupedCollections(false) , mInvalidateCachedBackground(false) - , mGoToSystem(nullptr) { addChild(&mMenu); mMenu.addButton("BACK", "back", [this] { delete this; }); diff --git a/es-app/src/scrapers/Scraper.cpp b/es-app/src/scrapers/Scraper.cpp index c768843a8..f424a008f 100644 --- a/es-app/src/scrapers/Scraper.cpp +++ b/es-app/src/scrapers/Scraper.cpp @@ -373,11 +373,11 @@ MediaDownloadHandle::MediaDownloadHandle(const std::string& url, const std::string& mediaType, const bool resizeFile, bool& savedNewMedia) - : mSavePath(path) + : mReq(new HttpReq(url)) + , mSavePath(path) , mExistingMediaFile(existingMediaPath) , mMediaType(mediaType) , mResizeFile(resizeFile) - , mReq(new HttpReq(url)) { mSavedNewMediaPtr = &savedNewMedia; } diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 0a4ecd850..64a2e7246 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -28,10 +28,10 @@ const int logoBuffersRight[] = {1, 2, 5}; SystemView::SystemView(Window* window) : IList(window, LIST_SCROLL_STYLE_SLOW, LIST_ALWAYS_LOOP) + , mSystemInfo(window, "SYSTEM INFO", Font::get(FONT_SIZE_SMALL), 0x33333300, ALIGN_CENTER) , mPreviousScrollVelocity(0) , mUpdatedGameCount(false) , mViewNeedsReload(true) - , mSystemInfo(window, "SYSTEM INFO", Font::get(FONT_SIZE_SMALL), 0x33333300, ALIGN_CENTER) { mCamOffset = 0; mExtrasCamOffset = 0; @@ -182,7 +182,6 @@ void SystemView::goToSystem(SystemData* system, bool animate) bool SystemView::input(InputConfig* config, Input input) { auto it = SystemData::sSystemVector.cbegin(); - const std::shared_ptr& theme = (*it)->getTheme(); if (input.value != 0) { if (config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_r && diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 376f70b15..8bcc689ea 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -69,9 +69,11 @@ void ViewController::init(Window* window) ViewController::ViewController(Window* window) : GuiComponent(window) + , mNoGamesMessageBox(nullptr) , mCurrentView(nullptr) , mPreviousView(nullptr) , mSkipView(nullptr) + , mGameToLaunch(nullptr) , mCamera(Renderer::getIdentity()) , mSystemViewTransition(false) , mWrappedViews(false) @@ -79,8 +81,6 @@ ViewController::ViewController(Window* window) , mCancelledTransition(false) , mLockInput(false) , mNextSystem(false) - , mGameToLaunch(nullptr) - , mNoGamesMessageBox(nullptr) { mState.viewing = NOTHING; mState.viewstyle = AUTOMATIC; diff --git a/es-app/src/views/gamelist/DetailedGameListView.cpp b/es-app/src/views/gamelist/DetailedGameListView.cpp index 00bb64fed..ca9bb3136 100644 --- a/es-app/src/views/gamelist/DetailedGameListView.cpp +++ b/es-app/src/views/gamelist/DetailedGameListView.cpp @@ -18,9 +18,6 @@ DetailedGameListView::DetailedGameListView(Window* window, FileData* root) : BasicGameListView(window, root) - , mDescContainer(window) - , mDescription(window) - , mGamelistInfo(window) , mThumbnail(window) , mMarquee(window) , mImage(window) @@ -41,6 +38,9 @@ DetailedGameListView::DetailedGameListView(Window* window, FileData* root) , mLastPlayed(window) , mPlayCount(window) , mName(window) + , mDescContainer(window) + , mDescription(window) + , mGamelistInfo(window) , mLastUpdated(nullptr) { const float padding = 0.01f; diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp index ae7eae6ee..203c9001e 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGameListView.cpp @@ -24,9 +24,6 @@ GridGameListView::GridGameListView(Window* window, FileData* root) , mGrid(window) , mMarquee(window) , mImage(window) - , mDescContainer(window) - , mDescription(window) - , mGamelistInfo(window) , mLblRating(window) , mLblReleaseDate(window) , mLblDeveloper(window) @@ -44,6 +41,9 @@ GridGameListView::GridGameListView(Window* window, FileData* root) , mLastPlayed(window) , mPlayCount(window) , mName(window) + , mDescContainer(window) + , mDescription(window) + , mGamelistInfo(window) { const float padding = 0.01f; diff --git a/es-app/src/views/gamelist/GridGameListView.h b/es-app/src/views/gamelist/GridGameListView.h index f7a46ea6a..9a0bf0714 100644 --- a/es-app/src/views/gamelist/GridGameListView.h +++ b/es-app/src/views/gamelist/GridGameListView.h @@ -76,6 +76,9 @@ private: void initMDLabels(); void initMDValues(); + ImageComponent mMarquee; + ImageComponent mImage; + TextComponent mLblRating; TextComponent mLblReleaseDate; TextComponent mLblDeveloper; @@ -85,8 +88,6 @@ private: TextComponent mLblLastPlayed; TextComponent mLblPlayCount; - ImageComponent mMarquee; - ImageComponent mImage; RatingComponent mRating; DateTimeComponent mReleaseDate; TextComponent mDeveloper; diff --git a/es-app/src/views/gamelist/VideoGameListView.cpp b/es-app/src/views/gamelist/VideoGameListView.cpp index 669a3f868..e350ece63 100644 --- a/es-app/src/views/gamelist/VideoGameListView.cpp +++ b/es-app/src/views/gamelist/VideoGameListView.cpp @@ -24,14 +24,10 @@ VideoGameListView::VideoGameListView(Window* window, FileData* root) : BasicGameListView(window, root) - , mDescContainer(window) - , mDescription(window) - , mGamelistInfo(window) , mThumbnail(window) , mMarquee(window) , mImage(window) , mVideo(nullptr) - , mVideoPlaying(false) , mLblRating(window) , mLblReleaseDate(window) , mLblDeveloper(window) @@ -49,6 +45,10 @@ VideoGameListView::VideoGameListView(Window* window, FileData* root) , mLastPlayed(window) , mPlayCount(window) , mName(window) + , mDescContainer(window) + , mDescription(window) + , mGamelistInfo(window) + , mVideoPlaying(false) , mLastUpdated(nullptr) { const float padding = 0.01f; diff --git a/es-app/src/views/gamelist/VideoGameListView.h b/es-app/src/views/gamelist/VideoGameListView.h index 4f6988d1f..ff1129742 100644 --- a/es-app/src/views/gamelist/VideoGameListView.h +++ b/es-app/src/views/gamelist/VideoGameListView.h @@ -38,8 +38,8 @@ private: ImageComponent mThumbnail; ImageComponent mMarquee; - VideoComponent* mVideo; ImageComponent mImage; + VideoComponent* mVideo; TextComponent mLblRating; TextComponent mLblReleaseDate; diff --git a/es-core/src/GuiComponent.cpp b/es-core/src/GuiComponent.cpp index d2e55030b..5075fc311 100644 --- a/es-core/src/GuiComponent.cpp +++ b/es-core/src/GuiComponent.cpp @@ -19,19 +19,19 @@ GuiComponent::GuiComponent(Window* window) : mWindow(window) , mParent(nullptr) + , mOpacity(255) , mColor(0) + , mSaturation(1.0f) , mColorShift(0) , mColorShiftEnd(0) - , mOpacity(255) - , mSaturation(1.0f) , mPosition({}) , mOrigin({}) , mRotationOrigin(0.5f, 0.5f) , mSize({}) - , mTransform(Renderer::getIdentity()) , mIsProcessing(false) , mVisible(true) , mEnabled(true) + , mTransform(Renderer::getIdentity()) { for (unsigned char i = 0; i < MAX_ANIMATIONS; i++) mAnimationMap[i] = nullptr; diff --git a/es-core/src/GuiComponent.h b/es-core/src/GuiComponent.h index 543ed901a..322efab40 100644 --- a/es-core/src/GuiComponent.h +++ b/es-core/src/GuiComponent.h @@ -234,6 +234,11 @@ protected: void updateSelf(int deltaTime); // Updates animations. void updateChildren(int deltaTime); // Updates animations. + Window* mWindow; + + GuiComponent* mParent; + std::vector mChildren; + unsigned char mOpacity; unsigned int mColor; float mSaturation; @@ -243,11 +248,6 @@ protected: unsigned int mColorOriginalValue; unsigned int mColorChangedValue; - Window* mWindow; - - GuiComponent* mParent; - std::vector mChildren; - glm::vec3 mPosition; glm::vec2 mOrigin; glm::vec2 mRotationOrigin; diff --git a/es-core/src/HttpReq.h b/es-core/src/HttpReq.h index 28a5ff228..d0b9f38ee 100644 --- a/es-core/src/HttpReq.h +++ b/es-core/src/HttpReq.h @@ -79,8 +79,8 @@ private: static CURLM* s_multi_handle; - CURL* mHandle; Status mStatus; + CURL* mHandle; std::stringstream mContent; std::string mErrorMsg; diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index c639c23a3..49926b01b 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -414,7 +414,7 @@ void Settings::loadFile() } // Parameters for the macro defined above. -SETTINGS_GETSET(bool, mBoolMap, getBool, getDefaultBool, setBool); -SETTINGS_GETSET(int, mIntMap, getInt, getDefaultInt, setInt); -SETTINGS_GETSET(float, mFloatMap, getFloat, getDefaultFloat, setFloat); -SETTINGS_GETSET(const std::string&, mStringMap, getString, getDefaultString, setString); +SETTINGS_GETSET(bool, mBoolMap, getBool, getDefaultBool, setBool) +SETTINGS_GETSET(int, mIntMap, getInt, getDefaultInt, setInt) +SETTINGS_GETSET(float, mFloatMap, getFloat, getDefaultFloat, setFloat) +SETTINGS_GETSET(const std::string&, mStringMap, getString, getDefaultString, setString) diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index cea7e1066..d5e76b651 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -30,13 +30,14 @@ Window::Window() , mMediaViewer(nullptr) , mLaunchScreen(nullptr) , mInfoPopup(nullptr) - , mNormalizeNextUpdate(false) + , mListScrollOpacity(0) , mFrameTimeElapsed(0) , mFrameCountElapsed(0) , mAverageDeltaTime(10) + , mTimeSinceLastInput(0) + , mNormalizeNextUpdate(false) , mAllowSleep(true) , mSleeping(false) - , mTimeSinceLastInput(0) , mRenderScreensaver(false) , mRenderMediaViewer(false) , mRenderLaunchScreen(false) @@ -46,7 +47,6 @@ Window::Window() , mInvalidatedCachedBackground(false) , mVideoPlayerCount(0) , mTopScale(0.5) - , mListScrollOpacity(0) , mChangedThemeSet(false) { mHelp = new HelpComponent(this); @@ -792,7 +792,7 @@ int Window::getVideoPlayerCount() videoPlayerCount = mVideoPlayerCount; mVideoCountMutex.unlock(); return videoPlayerCount; -}; +} void Window::setLaunchedGame() { diff --git a/es-core/src/Window.h b/es-core/src/Window.h index 193053c43..69f69d653 100644 --- a/es-core/src/Window.h +++ b/es-core/src/Window.h @@ -158,31 +158,31 @@ private: HelpComponent* mHelp; ImageComponent* mBackgroundOverlay; unsigned char mBackgroundOverlayOpacity; - Screensaver* mScreensaver; - InfoPopup* mInfoPopup; std::vector mGuiStack; std::vector> mDefaultFonts; std::unique_ptr mFrameDataText; + Screensaver* mScreensaver; MediaViewer* mMediaViewer; - bool mRenderMediaViewer; - GuiLaunchScreen* mLaunchScreen; - bool mRenderLaunchScreen; + InfoPopup* mInfoPopup; std::string mListScrollText; std::shared_ptr mListScrollFont; unsigned char mListScrollOpacity; - bool mNormalizeNextUpdate; int mFrameTimeElapsed; int mFrameCountElapsed; int mAverageDeltaTime; - bool mAllowSleep; - bool mSleeping; unsigned int mTimeSinceLastInput; + bool mNormalizeNextUpdate; + bool mAllowSleep; + bool mSleeping; + bool mRenderScreensaver; + bool mRenderMediaViewer; + bool mRenderLaunchScreen; bool mGameLaunchedState; bool mAllowTextScrolling; bool mCachedBackground; diff --git a/es-core/src/animations/MoveCameraAnimation.h b/es-core/src/animations/MoveCameraAnimation.h index b84964ad4..7c4bc7f08 100644 --- a/es-core/src/animations/MoveCameraAnimation.h +++ b/es-core/src/animations/MoveCameraAnimation.h @@ -17,8 +17,8 @@ class MoveCameraAnimation : public Animation public: MoveCameraAnimation(glm::mat4& camera, const glm::vec3& target) : mCameraStart(camera) - , mTarget(target) , cameraPosition(camera) + , mTarget(target) { } diff --git a/es-core/src/components/ComponentGrid.h b/es-core/src/components/ComponentGrid.h index 85385f27d..fc1145108 100644 --- a/es-core/src/components/ComponentGrid.h +++ b/es-core/src/components/ComponentGrid.h @@ -27,7 +27,7 @@ namespace GridFlags BORDER_LEFT = 4, BORDER_RIGHT = 8 }; -}; // namespace GridFlags +} // namespace GridFlags // Provides basic layout of components in an X*Y grid. class ComponentGrid : public GuiComponent diff --git a/es-core/src/components/DateTimeEditComponent.cpp b/es-core/src/components/DateTimeEditComponent.cpp index 5796f7621..23b900aae 100644 --- a/es-core/src/components/DateTimeEditComponent.cpp +++ b/es-core/src/components/DateTimeEditComponent.cpp @@ -20,9 +20,9 @@ DateTimeEditComponent::DateTimeEditComponent(Window* window, bool alignRight, Di , mRelativeUpdateAccumulator(0) , mColor(0x777777FF) , mFont(Font::get(FONT_SIZE_SMALL, FONT_PATH_LIGHT)) + , mAlignRight(alignRight) , mUppercase(false) , mAutoSize(true) - , mAlignRight(alignRight) { updateTextCache(); } diff --git a/es-core/src/components/GridTileComponent.cpp b/es-core/src/components/GridTileComponent.cpp index dbe914da5..99cb9794d 100644 --- a/es-core/src/components/GridTileComponent.cpp +++ b/es-core/src/components/GridTileComponent.cpp @@ -315,7 +315,7 @@ std::shared_ptr GridTileComponent::getTexture() return mImage->getTexture(); return nullptr; -}; +} void GridTileComponent::forceSize(glm::vec2 size, float selectedZoom) { diff --git a/es-core/src/components/ImageComponent.cpp b/es-core/src/components/ImageComponent.cpp index e292f180a..1f02b95c7 100644 --- a/es-core/src/components/ImageComponent.cpp +++ b/es-core/src/components/ImageComponent.cpp @@ -29,20 +29,20 @@ glm::vec2 ImageComponent::getSize() const ImageComponent::ImageComponent(Window* window, bool forceLoad, bool dynamic) : GuiComponent(window) - , mTargetIsMax(false) - , mTargetIsMin(false) + , mTargetSize({}) , mFlipX(false) , mFlipY(false) - , mTargetSize(0, 0) + , mTargetIsMax(false) + , mTargetIsMin(false) , mColorShift(0xFFFFFFFF) , mColorShiftEnd(0xFFFFFFFF) , mColorGradientHorizontal(true) - , mForceLoad(forceLoad) - , mDynamic(dynamic) , mFadeOpacity(0) , mFading(false) + , mForceLoad(forceLoad) + , mDynamic(dynamic) , mRotateByTargetSize(false) - , mTopLeftCrop(0.0f, 0.0f) + , mTopLeftCrop({}) , mBottomRightCrop(1.0f, 1.0f) { updateColors(); diff --git a/es-core/src/components/ImageComponent.h b/es-core/src/components/ImageComponent.h index 15f2c27f7..ca537c62f 100644 --- a/es-core/src/components/ImageComponent.h +++ b/es-core/src/components/ImageComponent.h @@ -101,7 +101,10 @@ public: private: glm::vec2 mTargetSize; - bool mFlipX, mFlipY, mTargetIsMax, mTargetIsMin; + bool mFlipX; + bool mFlipY; + bool mTargetIsMax; + bool mTargetIsMin; // Calculates the correct mSize from our resizing information (set by setResize/setMaxSize). // Used internally whenever the resizing parameters or texture change. diff --git a/es-core/src/components/NinePatchComponent.cpp b/es-core/src/components/NinePatchComponent.cpp index 4de95d9f7..d8a6b6716 100644 --- a/es-core/src/components/NinePatchComponent.cpp +++ b/es-core/src/components/NinePatchComponent.cpp @@ -17,11 +17,11 @@ NinePatchComponent::NinePatchComponent(Window* window, unsigned int edgeColor, unsigned int centerColor) : GuiComponent(window) + , mVertices(nullptr) + , mPath(path) , mCornerSize(16.0f, 16.0f) , mEdgeColor(edgeColor) , mCenterColor(centerColor) - , mPath(path) - , mVertices(nullptr) { if (!mPath.empty()) buildVertices(); diff --git a/es-core/src/components/OptionListComponent.h b/es-core/src/components/OptionListComponent.h index fc21ce2f5..1510625a4 100644 --- a/es-core/src/components/OptionListComponent.h +++ b/es-core/src/components/OptionListComponent.h @@ -288,9 +288,9 @@ private: OptionListComponent* parent, const std::string& title) : GuiComponent(window) - , mHelpStyle(helpstyle) , mMenu(window, title.c_str()) , mParent(parent) + , mHelpStyle(helpstyle) { auto font = Font::get(FONT_SIZE_MEDIUM); ComponentListRow row; diff --git a/es-core/src/components/RatingComponent.cpp b/es-core/src/components/RatingComponent.cpp index 1751d0f46..6c2c22c6f 100644 --- a/es-core/src/components/RatingComponent.cpp +++ b/es-core/src/components/RatingComponent.cpp @@ -15,12 +15,12 @@ RatingComponent::RatingComponent(Window* window, bool colorizeChanges) : GuiComponent(window) + , mColorOriginalValue(DEFAULT_COLORSHIFT) + , mColorChangedValue(DEFAULT_COLORSHIFT) , mColorShift(DEFAULT_COLORSHIFT) , mColorShiftEnd(DEFAULT_COLORSHIFT) , mUnfilledColor(DEFAULT_COLORSHIFT) , mColorizeChanges(colorizeChanges) - , mColorOriginalValue(DEFAULT_COLORSHIFT) - , mColorChangedValue(DEFAULT_COLORSHIFT) { mFilledTexture = TextureResource::get(":/graphics/star_filled.svg", true); mUnfilledTexture = TextureResource::get(":/graphics/star_unfilled.svg", true); diff --git a/es-core/src/components/ScrollableContainer.cpp b/es-core/src/components/ScrollableContainer.cpp index 8a342a641..a6b39cf7f 100644 --- a/es-core/src/components/ScrollableContainer.cpp +++ b/es-core/src/components/ScrollableContainer.cpp @@ -16,13 +16,13 @@ ScrollableContainer::ScrollableContainer(Window* window) : GuiComponent(window) + , mScrollPos({}) + , mScrollDir({}) + , mFontSize(0.0f) , mAutoScrollDelay(0) , mAutoScrollSpeed(0) , mAutoScrollAccumulator(0) - , mScrollPos(0, 0) - , mScrollDir(0, 0) , mAutoScrollResetAccumulator(0) - , mFontSize(0.0f) { // Set the modifier to get equivalent scrolling speed regardless of screen resolution. mResolutionModifier = Renderer::getScreenHeightModifier(); diff --git a/es-core/src/components/TextComponent.cpp b/es-core/src/components/TextComponent.cpp index 3b268955e..2af422b19 100644 --- a/es-core/src/components/TextComponent.cpp +++ b/es-core/src/components/TextComponent.cpp @@ -15,16 +15,16 @@ TextComponent::TextComponent(Window* window) : GuiComponent(window) , mFont(Font::get(FONT_SIZE_MEDIUM)) - , mUppercase(false) , mColor(0x000000FF) + , mBgColor(0) + , mMargin(0.0f) + , mRenderBackground(false) + , mUppercase(false) , mAutoCalcExtent(true, true) , mHorizontalAlignment(ALIGN_LEFT) , mVerticalAlignment(ALIGN_CENTER) , mLineSpacing(1.5f) , mNoTopMargin(false) - , mBgColor(0) - , mMargin(0.0f) - , mRenderBackground(false) { } @@ -39,16 +39,16 @@ TextComponent::TextComponent(Window* window, float margin) : GuiComponent(window) , mFont(nullptr) - , mUppercase(false) , mColor(0x000000FF) + , mBgColor(0) + , mMargin(margin) + , mRenderBackground(false) + , mUppercase(false) , mAutoCalcExtent(true, true) , mHorizontalAlignment(align) , mVerticalAlignment(ALIGN_CENTER) , mLineSpacing(1.5f) , mNoTopMargin(false) - , mBgColor(0) - , mMargin(margin) - , mRenderBackground(false) { setFont(font); setColor(color); diff --git a/es-core/src/components/TextEditComponent.cpp b/es-core/src/components/TextEditComponent.cpp index ce35ea84e..51c1b7c32 100644 --- a/es-core/src/components/TextEditComponent.cpp +++ b/es-core/src/components/TextEditComponent.cpp @@ -20,14 +20,14 @@ TextEditComponent::TextEditComponent(Window* window) : GuiComponent{window} - , mBox{window, ":/graphics/textinput.svg"} , mFocused{false} - , mScrollOffset{0.0f, 0.0f} - , mCursor{0} , mEditing{false} - , mFont{Font::get(FONT_SIZE_MEDIUM, FONT_PATH_LIGHT)} - , mCursorRepeatDir{0} + , mCursor{0} , mBlinkTime{0} + , mCursorRepeatDir{0} + , mScrollOffset{0.0f, 0.0f} + , mBox{window, ":/graphics/textinput.svg"} + , mFont{Font::get(FONT_SIZE_MEDIUM, FONT_PATH_LIGHT)} { addChild(&mBox); onFocusLost(); diff --git a/es-core/src/components/VideoComponent.cpp b/es-core/src/components/VideoComponent.cpp index 78f6261dd..27de9c4de 100644 --- a/es-core/src/components/VideoComponent.cpp +++ b/es-core/src/components/VideoComponent.cpp @@ -22,8 +22,11 @@ VideoComponent::VideoComponent(Window* window) : GuiComponent(window) , mWindow(window) , mStaticImage(window) - , mVideoHeight(0) , mVideoWidth(0) + , mVideoHeight(0) + , mTargetSize(0, 0) + , mVideoAreaPos(0, 0) + , mVideoAreaSize(0, 0) , mStartDelayed(false) , mIsPlaying(false) , mIsActuallyPlaying(false) @@ -37,9 +40,6 @@ VideoComponent::VideoComponent(Window* window) , mBlockPlayer(false) , mTargetIsMax(false) , mFadeIn(1.0) - , mTargetSize(0, 0) - , mVideoAreaPos(0, 0) - , mVideoAreaSize(0, 0) { // Setup the default configuration. mConfig.showSnapshotDelay = false; diff --git a/es-core/src/components/VideoComponent.h b/es-core/src/components/VideoComponent.h index 7f6ef5099..2c14e0d0d 100644 --- a/es-core/src/components/VideoComponent.h +++ b/es-core/src/components/VideoComponent.h @@ -108,6 +108,8 @@ private: protected: Window* mWindow; + ImageComponent mStaticImage; + unsigned mVideoWidth; unsigned mVideoHeight; glm::vec2 mTargetSize; @@ -115,7 +117,6 @@ protected: glm::vec2 mVideoAreaSize; std::shared_ptr mTexture; std::string mStaticImagePath; - ImageComponent mStaticImage; std::string mVideoPath; std::string mPlayingVideoPath; diff --git a/es-core/src/components/VideoFFmpegComponent.cpp b/es-core/src/components/VideoFFmpegComponent.cpp index 923c02528..4173839ce 100644 --- a/es-core/src/components/VideoFFmpegComponent.cpp +++ b/es-core/src/components/VideoFFmpegComponent.cpp @@ -44,9 +44,9 @@ VideoFFmpegComponent::VideoFFmpegComponent(Window* window) , mAFilterGraph(nullptr) , mAFilterInputs(nullptr) , mAFilterOutputs(nullptr) - , mVideoTimeBase(0.0l) , mVideoTargetQueueSize(0) , mAudioTargetQueueSize(0) + , mVideoTimeBase(0.0l) , mAccumulatedTime(0) , mStartTimeAccumulation(false) , mDecodedFrame(false) diff --git a/es-core/src/components/VideoVlcComponent.cpp b/es-core/src/components/VideoVlcComponent.cpp index 9c3fc3084..fc2f6507f 100644 --- a/es-core/src/components/VideoVlcComponent.cpp +++ b/es-core/src/components/VideoVlcComponent.cpp @@ -34,8 +34,8 @@ libvlc_instance_t* VideoVlcComponent::mVLC = nullptr; VideoVlcComponent::VideoVlcComponent(Window* window) : VideoComponent(window) - , mMediaPlayer(nullptr) , mMedia(nullptr) + , mMediaPlayer(nullptr) , mContext({}) , mHasSetAudioVolume(false) { diff --git a/es-core/src/guis/GuiMsgBox.cpp b/es-core/src/guis/GuiMsgBox.cpp index 22261cfc4..0e0a7fcb2 100644 --- a/es-core/src/guis/GuiMsgBox.cpp +++ b/es-core/src/guis/GuiMsgBox.cpp @@ -26,9 +26,9 @@ GuiMsgBox::GuiMsgBox(Window* window, bool disableBackButton, bool deleteOnButtonPress) : GuiComponent(window) - , mHelpStyle(helpstyle) , mBackground(window, ":/graphics/frame.svg") , mGrid(window, glm::ivec2{1, 2}) + , mHelpStyle(helpstyle) , mDisableBackButton(disableBackButton) , mDeleteOnButtonPress(deleteOnButtonPress) { diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp index 6b1a08f95..2e28d43fb 100644 --- a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp @@ -89,17 +89,17 @@ GuiTextEditKeyboardPopup::GuiTextEditKeyboardPopup( const std::string& clearBtnHelpText, const std::string& cancelBtnHelpText) : GuiComponent{window} + , mBackground{window, ":/graphics/frame.svg"} + , mGrid{window, glm::ivec2{1, (infoString != "" && defaultValue != "" ? 8 : 6)}} , mHelpStyle{helpstyle} , mInitValue{initValue} - , mOkCallback{okCallback} - , mMultiLine{multiLine} , mAcceptBtnHelpText{acceptBtnHelpText} , mSaveConfirmationText{saveConfirmationText} , mLoadBtnHelpText{loadBtnHelpText} , mClearBtnHelpText{clearBtnHelpText} , mCancelBtnHelpText{cancelBtnHelpText} - , mBackground{window, ":/graphics/frame.svg"} - , mGrid{window, glm::ivec2{1, (infoString != "" && defaultValue != "" ? 8 : 6)}} + , mOkCallback{okCallback} + , mMultiLine{multiLine} , mComplexMode{(infoString != "" && defaultValue != "")} , mDeleteRepeat{false} , mShift{false} @@ -346,7 +346,7 @@ bool GuiTextEditKeyboardPopup::input(InputConfig* config, Input input) // Pressing back (or the escape key if using keyboard input) closes us. if ((config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_ESCAPE) || - (!keyboardBackspace && config->isMappedTo("b", input)) && input.value) { + (!keyboardBackspace && input.value && config->isMappedTo("b", input))) { if (mText->getValue() != mInitValue) { // Changes were made, ask if the user wants to save them. mWindow->pushGui(new GuiMsgBox( diff --git a/es-core/src/guis/GuiTextEditPopup.cpp b/es-core/src/guis/GuiTextEditPopup.cpp index 38e2a483a..132d81056 100644 --- a/es-core/src/guis/GuiTextEditPopup.cpp +++ b/es-core/src/guis/GuiTextEditPopup.cpp @@ -29,17 +29,17 @@ GuiTextEditPopup::GuiTextEditPopup(Window* window, const std::string& clearBtnHelpText, const std::string& cancelBtnHelpText) : GuiComponent{window} + , mBackground{window, ":/graphics/frame.svg"} + , mGrid{window, glm::ivec2{1, (infoString != "" && defaultValue != "" ? 5 : 3)}} , mHelpStyle{helpstyle} , mInitValue{initValue} - , mOkCallback{okCallback} - , mMultiLine{multiLine} , mAcceptBtnText{acceptBtnText} , mSaveConfirmationText{saveConfirmationText} , mLoadBtnHelpText{loadBtnHelpText} , mClearBtnHelpText{clearBtnHelpText} , mCancelBtnHelpText{cancelBtnHelpText} - , mBackground{window, ":/graphics/frame.svg"} - , mGrid{window, glm::ivec2{1, (infoString != "" && defaultValue != "" ? 5 : 3)}} + , mOkCallback{okCallback} + , mMultiLine{multiLine} , mComplexMode{(infoString != "" && defaultValue != "")} , mDeleteRepeat{false} , mDeleteRepeatTimer{0} @@ -175,7 +175,7 @@ bool GuiTextEditPopup::input(InputConfig* config, Input input) // Pressing back (or the escape key if using keyboard input) closes us. if ((config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_ESCAPE) || - (!keyboardBackspace && config->isMappedTo("b", input)) && input.value) { + (!keyboardBackspace && input.value && config->isMappedTo("b", input))) { if (mText->getValue() != mInitValue) { // Changes were made, ask if the user wants to save them. mWindow->pushGui(new GuiMsgBox( diff --git a/es-core/src/renderers/Renderer.cpp b/es-core/src/renderers/Renderer.cpp index be619c006..b5a0ba720 100644 --- a/es-core/src/renderers/Renderer.cpp +++ b/es-core/src/renderers/Renderer.cpp @@ -539,7 +539,7 @@ namespace Renderer return sShaderProgramVector[index - 1]; else return nullptr; - }; + } const glm::mat4 getProjectionMatrix() { return mProjectionMatrix; } SDL_Window* getSDLWindow() { return sdlWindow; } diff --git a/es-core/src/resources/ResourceManager.cpp b/es-core/src/resources/ResourceManager.cpp index 0f4072b09..99aab2ae5 100644 --- a/es-core/src/resources/ResourceManager.cpp +++ b/es-core/src/resources/ResourceManager.cpp @@ -18,7 +18,6 @@ #include auto array_deleter = [](unsigned char* p) { delete[] p; }; -auto nop_deleter = [](unsigned char* /*p*/) {}; std::shared_ptr ResourceManager::sInstance = nullptr; diff --git a/es-core/src/resources/TextureData.cpp b/es-core/src/resources/TextureData.cpp index 65e715512..5760111e0 100644 --- a/es-core/src/resources/TextureData.cpp +++ b/es-core/src/resources/TextureData.cpp @@ -26,13 +26,13 @@ TextureData::TextureData(bool tile) : mTile(tile) , mTextureID(0) , mDataRGBA({}) - , mScaleDuringLoad(1.0f) - , mScalable(false) - , mLinearMagnify(false) , mWidth(0) , mHeight(0) , mSourceWidth(0.0f) , mSourceHeight(0.0f) + , mScaleDuringLoad(1.0f) + , mScalable(false) + , mLinearMagnify(false) { } diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp index 1e6075d62..4ff05ba45 100644 --- a/es-core/src/utils/FileSystemUtil.cpp +++ b/es-core/src/utils/FileSystemUtil.cpp @@ -260,8 +260,8 @@ namespace Utils std::string getPreferredPath(const std::string& path) { std::string preferredPath = path; - size_t offset = std::string::npos; #if defined(_WIN64) + size_t offset = std::string::npos; // Convert '/' to '\\' while ((offset = preferredPath.find('/')) != std::string::npos) preferredPath.replace(offset, 1, "\\"); From c7d815a125e38313a86793ffbfeff3815caa9d59 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 18 Sep 2021 11:49:39 +0200 Subject: [PATCH 20/64] Fixed multiple compiler warnings related to virtual functions. --- es-app/src/MediaViewer.cpp | 2 +- es-app/src/MediaViewer.h | 12 ++++++------ es-app/src/guis/GuiLaunchScreen.cpp | 2 +- es-app/src/guis/GuiLaunchScreen.h | 2 +- es-core/src/Window.cpp | 4 ++-- es-core/src/Window.h | 4 ++-- es-core/src/components/SliderComponent.cpp | 2 -- es-core/src/components/SliderComponent.h | 7 +++++-- es-core/src/components/TextListComponent.h | 1 + 9 files changed, 19 insertions(+), 17 deletions(-) diff --git a/es-app/src/MediaViewer.cpp b/es-app/src/MediaViewer.cpp index f79caacf3..66fb41e65 100644 --- a/es-app/src/MediaViewer.cpp +++ b/es-app/src/MediaViewer.cpp @@ -81,7 +81,7 @@ void MediaViewer::update(int deltaTime) mVideo->update(deltaTime); } -void MediaViewer::render() +void MediaViewer::render(const glm::mat4& /*parentTrans*/) { glm::mat4 trans{Renderer::getIdentity()}; Renderer::setMatrix(trans); diff --git a/es-app/src/MediaViewer.h b/es-app/src/MediaViewer.h index 3fecd9c3d..d60481a27 100644 --- a/es-app/src/MediaViewer.h +++ b/es-app/src/MediaViewer.h @@ -20,11 +20,11 @@ public: MediaViewer(Window* window); virtual ~MediaViewer(); - virtual bool startMediaViewer(FileData* game); - virtual void stopMediaViewer(); + virtual bool startMediaViewer(FileData* game) override; + virtual void stopMediaViewer() override; - virtual void update(int deltaTime); - virtual void render(); + virtual void update(int deltaTime) override; + virtual void render(const glm::mat4& parentTrans) override; private: void initiateViewer(); @@ -33,8 +33,8 @@ private: void playVideo(); void showImage(int index); - virtual void showNext(); - virtual void showPrevious(); + virtual void showNext() override; + virtual void showPrevious() override; Window* mWindow; FileData* mGame; diff --git a/es-app/src/guis/GuiLaunchScreen.cpp b/es-app/src/guis/GuiLaunchScreen.cpp index 1b29bd8fe..bffcefb71 100644 --- a/es-app/src/guis/GuiLaunchScreen.cpp +++ b/es-app/src/guis/GuiLaunchScreen.cpp @@ -220,7 +220,7 @@ void GuiLaunchScreen::update(int deltaTime) mScaleUp = glm::clamp(mScaleUp + 0.07f, 0.0f, 1.0f); } -void GuiLaunchScreen::render() +void GuiLaunchScreen::render(const glm::mat4& /*parentTrans*/) { // Scale up animation. if (mScaleUp < 1.0f) diff --git a/es-app/src/guis/GuiLaunchScreen.h b/es-app/src/guis/GuiLaunchScreen.h index 1301c25bf..c40d3c220 100644 --- a/es-app/src/guis/GuiLaunchScreen.h +++ b/es-app/src/guis/GuiLaunchScreen.h @@ -30,7 +30,7 @@ public: void onSizeChanged() override; virtual void update(int deltaTime) override; - virtual void render() override; + virtual void render(const glm::mat4& parentTrans) override; private: Window* mWindow; diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index d5e76b651..5195d5b97 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -561,10 +561,10 @@ void Window::render() } if (mRenderMediaViewer) - mMediaViewer->render(); + mMediaViewer->render(trans); if (mRenderLaunchScreen) - mLaunchScreen->render(); + mLaunchScreen->render(trans); if (Settings::getInstance()->getBool("DisplayGPUStatistics") && mFrameDataText) { Renderer::setMatrix(Renderer::getIdentity()); diff --git a/es-core/src/Window.h b/es-core/src/Window.h index 69f69d653..5b65a1801 100644 --- a/es-core/src/Window.h +++ b/es-core/src/Window.h @@ -61,7 +61,7 @@ public: virtual void showPrevious() = 0; virtual void update(int deltaTime) = 0; - virtual void render() = 0; + virtual void render(const glm::mat4& parentTrans) = 0; }; class GuiLaunchScreen @@ -70,7 +70,7 @@ public: virtual void displayLaunchScreen(FileData* game) = 0; virtual void closeLaunchScreen() = 0; virtual void update(int deltaTime) = 0; - virtual void render() = 0; + virtual void render(const glm::mat4& parentTrans) = 0; }; class InfoPopup diff --git a/es-core/src/components/SliderComponent.cpp b/es-core/src/components/SliderComponent.cpp index 35c84a26a..bd0c40696 100644 --- a/es-core/src/components/SliderComponent.cpp +++ b/es-core/src/components/SliderComponent.cpp @@ -110,8 +110,6 @@ void SliderComponent::setValue(float value) onValueChanged(); } -float SliderComponent::getValue() { return mValue; } - void SliderComponent::onSizeChanged() { if (!mSuffix.empty()) diff --git a/es-core/src/components/SliderComponent.h b/es-core/src/components/SliderComponent.h index 13b5d3153..1e6214bc8 100644 --- a/es-core/src/components/SliderComponent.h +++ b/es-core/src/components/SliderComponent.h @@ -19,13 +19,16 @@ class TextCache; class SliderComponent : public GuiComponent { public: + using GuiComponent::getValue; + using GuiComponent::setValue; + // Minimum value (far left of the slider), maximum value (far right of the slider), // increment size (how much pressing L/R moves by), unit to display (optional). SliderComponent( Window* window, float min, float max, float increment, const std::string& suffix = ""); - void setValue(float val); - float getValue(); + void setValue(float value); + float getValue() { return mValue; } bool input(InputConfig* config, Input input) override; void update(int deltaTime) override; diff --git a/es-core/src/components/TextListComponent.h b/es-core/src/components/TextListComponent.h index 1261b9d05..b33ec6bd9 100644 --- a/es-core/src/components/TextListComponent.h +++ b/es-core/src/components/TextListComponent.h @@ -42,6 +42,7 @@ public: using IList::size; using IList::isScrolling; using IList::stopScrolling; + using GuiComponent::setColor; TextListComponent(Window* window); From 63767347f20a470d4f19b42047aa7c5af17c0034 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 14:37:10 +0200 Subject: [PATCH 21/64] Fixed numerous compiler warnings reported by the -Wall and -Wpedantic flags. --- es-app/src/FileData.cpp | 4 ++-- es-app/src/FileFilterIndex.h | 2 -- es-app/src/MediaViewer.cpp | 6 +++--- es-app/src/guis/GuiCollectionSystemsOptions.cpp | 2 +- es-app/src/guis/GuiMenu.cpp | 2 +- es-app/src/guis/GuiScraperMenu.cpp | 3 ++- es-app/src/guis/GuiScraperSearch.cpp | 2 +- es-app/src/scrapers/GamesDBJSONScraper.cpp | 2 +- es-app/src/scrapers/Scraper.cpp | 2 +- es-app/src/views/SystemView.cpp | 2 -- es-app/src/views/gamelist/GridGameListView.cpp | 8 +++++--- es-core/src/CECInput.cpp | 3 +++ es-core/src/Sound.cpp | 14 +++++++------- es-core/src/ThemeData.h | 13 +++++++------ es-core/src/Window.cpp | 3 ++- es-core/src/components/ComponentList.cpp | 5 +++-- es-core/src/components/IList.h | 2 +- es-core/src/components/ImageComponent.cpp | 2 +- es-core/src/components/ImageGridComponent.h | 16 +++++++++------- es-core/src/components/TextEditComponent.cpp | 4 ++-- es-core/src/components/TextEditComponent.h | 2 +- es-core/src/components/VideoFFmpegComponent.cpp | 5 +++-- es-core/src/guis/GuiInputConfig.cpp | 4 ++-- es-core/src/guis/GuiInputConfig.h | 1 - es-core/src/guis/GuiTextEditKeyboardPopup.cpp | 1 - es-core/src/guis/GuiTextEditKeyboardPopup.h | 1 - es-core/src/renderers/Renderer.cpp | 1 + es-core/src/renderers/Renderer.h | 8 +++++--- es-core/src/renderers/Renderer_GL21.cpp | 2 +- es-core/src/resources/Font.cpp | 14 ++++++++------ es-core/src/utils/TimeUtil.cpp | 8 ++++---- es-core/src/utils/TimeUtil.h | 2 +- 32 files changed, 78 insertions(+), 68 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 4f9d88a19..cfc4fe62a 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -223,7 +223,7 @@ const std::string FileData::getMediafilePath(std::string subdirectory, std::stri subFolders + "/" + getDisplayName(); // Look for an image file in the media directory. - for (int i = 0; i < extList.size(); i++) { + for (size_t i = 0; i < extList.size(); i++) { std::string mediaPath = tempPath + extList[i]; if (Utils::FileSystem::exists(mediaPath)) return mediaPath; @@ -298,7 +298,7 @@ const std::string FileData::getVideoPath() const getMediaDirectory() + mSystemName + "/videos" + subFolders + "/" + getDisplayName(); // Look for media in the media directory. - for (int i = 0; i < extList.size(); i++) { + for (size_t i = 0; i < extList.size(); i++) { std::string mediaPath = tempPath + extList[i]; if (Utils::FileSystem::exists(mediaPath)) return mediaPath; diff --git a/es-app/src/FileFilterIndex.h b/es-app/src/FileFilterIndex.h index 4bbcd2832..4c68b25d1 100644 --- a/es-app/src/FileFilterIndex.h +++ b/es-app/src/FileFilterIndex.h @@ -115,8 +115,6 @@ private: std::vector mCompletedIndexFilteredKeys; std::vector mBrokenIndexFilteredKeys; std::vector mHiddenIndexFilteredKeys; - - FileData* mRootFolder; }; #endif // ES_APP_FILE_FILTER_INDEX_H diff --git a/es-app/src/MediaViewer.cpp b/es-app/src/MediaViewer.cpp index 66fb41e65..06f59e515 100644 --- a/es-app/src/MediaViewer.cpp +++ b/es-app/src/MediaViewer.cpp @@ -184,7 +184,7 @@ void MediaViewer::findMedia() void MediaViewer::showNext() { - if (mHasImages && mCurrentImageIndex != mImageFiles.size() - 1) + if (mHasImages && mCurrentImageIndex != static_cast(mImageFiles.size()) - 1) NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND); bool showedVideo = false; @@ -205,7 +205,7 @@ void MediaViewer::showNext() if ((mVideo || showedVideo) && !mDisplayingImage) mCurrentImageIndex = 0; - else if (mImageFiles.size() > mCurrentImageIndex + 1) + else if (static_cast(mImageFiles.size()) > mCurrentImageIndex + 1) mCurrentImageIndex++; if (mVideo) @@ -281,7 +281,7 @@ void MediaViewer::showImage(int index) mDisplayingImage = true; - if (!mImageFiles.empty() && mImageFiles.size() >= index) { + if (!mImageFiles.empty() && static_cast(mImageFiles.size()) >= index) { mImage = new ImageComponent(mWindow, false, false); mImage->setImage(mImageFiles[index]); mImage->setOrigin(0.5f, 0.5f); diff --git a/es-app/src/guis/GuiCollectionSystemsOptions.cpp b/es-app/src/guis/GuiCollectionSystemsOptions.cpp index f02385551..59cc0052e 100644 --- a/es-app/src/guis/GuiCollectionSystemsOptions.cpp +++ b/es-app/src/guis/GuiCollectionSystemsOptions.cpp @@ -283,7 +283,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(Window* window, std::st CollectionSystemsManager::get()->deleteCustomCollection(name); return true; }, - "NO", [this] { return false; })); + "NO", [] { return false; })); }; row.makeAcceptInputHandler(deleteCollectionCall); auto customCollection = std::make_shared( diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 2aa0d742a..63090620b 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -1331,7 +1331,7 @@ void GuiMenu::close(bool closeAllWindows) } else { Window* window = mWindow; - closeFunc = [window, this] { + closeFunc = [window] { while (window->peekGui() != ViewController::get()) delete window->peekGui(); }; diff --git a/es-app/src/guis/GuiScraperMenu.cpp b/es-app/src/guis/GuiScraperMenu.cpp index b85698e59..7507b0a73 100644 --- a/es-app/src/guis/GuiScraperMenu.cpp +++ b/es-app/src/guis/GuiScraperMenu.cpp @@ -91,7 +91,8 @@ GuiScraperMenu::GuiScraperMenu(Window* window, std::string title) } // The filter setting is only retained during the program session i.e. it's not saved // to es_settings.xml. - if (mFilters->getSelectedId() != Settings::getInstance()->getInt("ScraperFilter")) + if (mFilters->getSelectedId() != + static_cast(Settings::getInstance()->getInt("ScraperFilter"))) Settings::getInstance()->setInt("ScraperFilter", mFilters->getSelectedId()); }); diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index 5221820b6..93ff9f680 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -471,7 +471,7 @@ void GuiScraperSearch::updateInfoPane() if (mSearchType == ALWAYS_ACCEPT_FIRST_RESULT && mScraperResults.size()) i = 0; - if (i != -1 && static_cast(mScraperResults.size() > i)) { + if (i != -1 && static_cast(mScraperResults.size()) > i) { ScraperSearchResult& res = mScraperResults.at(i); mResultName->setText(Utils::String::toUpper(res.mdl.get("name"))); diff --git a/es-app/src/scrapers/GamesDBJSONScraper.cpp b/es-app/src/scrapers/GamesDBJSONScraper.cpp index 69f9052ed..b35f1a2c3 100644 --- a/es-app/src/scrapers/GamesDBJSONScraper.cpp +++ b/es-app/src/scrapers/GamesDBJSONScraper.cpp @@ -443,7 +443,7 @@ void TheGamesDBJSONRequest::process(const std::unique_ptr& req, // Find how many more requests we can make before the scraper // request allowance counter is reset. if (doc.HasMember("remaining_monthly_allowance") && doc.HasMember("extra_allowance")) { - for (auto i = 0; i < results.size(); i++) { + for (size_t i = 0; i < results.size(); i++) { results[i].scraperRequestAllowance = doc["remaining_monthly_allowance"].GetInt() + doc["extra_allowance"].GetInt(); } diff --git a/es-app/src/scrapers/Scraper.cpp b/es-app/src/scrapers/Scraper.cpp index f424a008f..c889f54b2 100644 --- a/es-app/src/scrapers/Scraper.cpp +++ b/es-app/src/scrapers/Scraper.cpp @@ -327,7 +327,7 @@ MDResolveHandle::MDResolveHandle(const ScraperSearchResult& result, mFuncs.push_back(ResolvePair(downloadMediaAsync(it->fileURL, filePath, it->existingMediaFile, it->subDirectory, it->resizeFile, mResult.savedNewMedia), - [this, filePath] {})); + [filePath] {})); } } } diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 64a2e7246..8159bacbd 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -181,8 +181,6 @@ void SystemView::goToSystem(SystemData* system, bool animate) bool SystemView::input(InputConfig* config, Input input) { - auto it = SystemData::sSystemVector.cbegin(); - if (input.value != 0) { if (config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_r && SDL_GetModState() & KMOD_LCTRL && Settings::getInstance()->getBool("Debug")) { diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp index 203c9001e..3621f2a98 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGameListView.cpp @@ -490,9 +490,11 @@ void GridGameListView::updateInfoPanel() // An animation is not playing, then animate if opacity != our target opacity. if ((comp->isAnimationPlaying(0) && comp->isAnimationReversed(0) != fadingOut) || (!comp->isAnimationPlaying(0) && comp->getOpacity() != (fadingOut ? 0 : 255))) { - auto func = [comp](float t) { - // TEMPORARY - This does not seem to work, needs to be reviewed later. - // comp->setOpacity(static_cast(glm::mix(0.0f, 1.0f, t) * 255)); + + // TEMPORARY - This does not seem to work, needs to be reviewed later. + // auto func = [comp](float t) { + auto func = [](float t) { + // comp->setOpacity(static_cast(glm::mix(0.0f, 1.0f, t) * 255)); }; comp->setAnimation(new LambdaAnimation(func, 150), 0, nullptr, fadingOut); } diff --git a/es-core/src/CECInput.cpp b/es-core/src/CECInput.cpp index dfd8caa49..e794118bd 100644 --- a/es-core/src/CECInput.cpp +++ b/es-core/src/CECInput.cpp @@ -147,6 +147,9 @@ CECInput::CECInput() mlibCEC = nullptr; return; } +#else + // This is simply to get rid of a Clang -Wunused-private-field compiler warning. + mlibCEC = nullptr; #endif // HAVE_LIBCEC } diff --git a/es-core/src/Sound.cpp b/es-core/src/Sound.cpp index 496d513e3..037c3155b 100644 --- a/es-core/src/Sound.cpp +++ b/es-core/src/Sound.cpp @@ -218,13 +218,13 @@ void NavigationSounds::loadThemeNavigationSounds(const std::shared_ptr #include #include #include @@ -127,17 +128,17 @@ public: template const T get(const std::string& prop) const { if (std::is_same::value) - return *(const T*)&properties.at(prop).v; + return std::any_cast(properties.at(prop).v); else if (std::is_same::value) - return *(const T*)&properties.at(prop).s; + return std::any_cast(properties.at(prop).s); else if (std::is_same::value) - return *(const T*)&properties.at(prop).i; + return std::any_cast(properties.at(prop).i); else if (std::is_same::value) - return *(const T*)&properties.at(prop).f; + return std::any_cast(properties.at(prop).f); else if (std::is_same::value) - return *(const T*)&properties.at(prop).b; + return std::any_cast(properties.at(prop).b); else if (std::is_same::value) - return *(const T*)&properties.at(prop).r; + return std::any_cast(properties.at(prop).r); return T(); } diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index 5195d5b97..6ca4dce4e 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -51,6 +51,7 @@ Window::Window() { mHelp = new HelpComponent(this); mBackgroundOverlay = new ImageComponent(this); + mBackgroundOverlayOpacity = 0; } Window::~Window() @@ -663,7 +664,7 @@ void Window::setHelpPrompts(const std::vector& prompts, const HelpSt "lt", "start", "back"}; - int i = 0; + size_t i = 0; int aVal = 0; int bVal = 0; while (i < map.size()) { diff --git a/es-core/src/components/ComponentList.cpp b/es-core/src/components/ComponentList.cpp index 7f617e8ea..17cd6e8c7 100644 --- a/es-core/src/components/ComponentList.cpp +++ b/es-core/src/components/ComponentList.cpp @@ -190,7 +190,7 @@ void ComponentList::render(const glm::mat4& parentTrans) // Draw our entries. std::vector drawAfterCursor; bool drawAll; - for (unsigned int i = 0; i < mEntries.size(); i++) { + for (size_t i = 0; i < mEntries.size(); i++) { auto& entry = mEntries.at(i); drawAll = !mFocused || i != static_cast(mCursor); for (auto it = entry.data.elements.cbegin(); it != entry.data.elements.cend(); it++) { @@ -198,7 +198,8 @@ void ComponentList::render(const glm::mat4& parentTrans) // For the row where the cursor is at, we want to remove any hue from the // font or image before inverting, as it would otherwise lead to an ugly // inverted color (e.g. red inverting to a green hue). - if (mFocused && i == mCursor && it->component->getValue() != "") { + if (mFocused && i == static_cast(mCursor) && + it->component->getValue() != "") { // Check if we're dealing with text or an image component. bool isTextComponent = true; unsigned int origColor = it->component->getColor(); diff --git a/es-core/src/components/IList.h b/es-core/src/components/IList.h index 566c34137..fcecbcc78 100644 --- a/es-core/src/components/IList.h +++ b/es-core/src/components/IList.h @@ -137,7 +137,7 @@ public: const UserData& getNext() const { // If there is a next entry, then return it, otherwise return the current entry. - if (mCursor + 1 < mEntries.size()) + if (mCursor + 1 < static_cast(mEntries.size())) return mEntries.at(mCursor + 1).object; else return mEntries.at(mCursor).object; diff --git a/es-core/src/components/ImageComponent.cpp b/es-core/src/components/ImageComponent.cpp index 1f02b95c7..600af7c22 100644 --- a/es-core/src/components/ImageComponent.cpp +++ b/es-core/src/components/ImageComponent.cpp @@ -77,7 +77,7 @@ void ImageComponent::resize() // This will be mTargetSize.x. We can't exceed it, nor be lower than it. mSize.x *= resizeScale.x; // We need to make sure we're not creating an image larger than max size. - mSize.y = std::min(floorf(mSize.y *= resizeScale.x), mTargetSize.y); + mSize.y = std::min(floorf(mSize.y * resizeScale.x), mTargetSize.y); } else { // This will be mTargetSize.y(). We can't exceed it. diff --git a/es-core/src/components/ImageGridComponent.h b/es-core/src/components/ImageGridComponent.h index 9abbc8531..a7124ad67 100644 --- a/es-core/src/components/ImageGridComponent.h +++ b/es-core/src/components/ImageGridComponent.h @@ -394,7 +394,7 @@ template void ImageGridComponent::onCursorChanged(const CursorSt bool direction = mCursor >= mLastCursor; int diff = direction ? mCursor - mLastCursor : mLastCursor - mCursor; - if (isScrollLoop() && diff == mEntries.size() - 1) + if (isScrollLoop() && diff == static_cast(mEntries.size()) - 1) direction = !direction; int oldStart = mStartPosition; @@ -426,18 +426,18 @@ template void ImageGridComponent::onCursorChanged(const CursorSt std::shared_ptr newTile = nullptr; int oldIdx = mLastCursor - mStartPosition + (dimOpposite * EXTRAITEMS); - if (oldIdx >= 0 && oldIdx < mTiles.size()) + if (oldIdx >= 0 && oldIdx < static_cast(mTiles.size())) oldTile = mTiles[oldIdx]; int newIdx = mCursor - mStartPosition + (dimOpposite * EXTRAITEMS); if (isScrollLoop()) { if (newIdx < 0) newIdx += static_cast(mEntries.size()); - else if (newIdx >= mTiles.size()) + else if (newIdx >= static_cast(mTiles.size())) newIdx -= static_cast(mEntries.size()); } - if (newIdx >= 0 && newIdx < mTiles.size()) + if (newIdx >= 0 && newIdx < static_cast(mTiles.size())) newTile = mTiles[newIdx]; for (auto it = mTiles.begin(); it != mTiles.end(); it++) { @@ -670,7 +670,7 @@ void ImageGridComponent::updateTileAtPos(int tilePos, int dif = mCursor - tilePos; int idx = mLastCursor - dif; - if (idx < 0 || idx >= mTiles.size()) + if (idx < 0 || idx >= static_cast(mTiles.size())) idx = 0; glm::vec3 pos{mTiles.at(idx)->getBackgroundPosition()}; @@ -720,8 +720,10 @@ template bool ImageGridComponent::isScrollLoop() if (!mScrollLoop) return false; if (isVertical()) - return (mGridDimension.x * (mGridDimension.y - 2 * EXTRAITEMS)) <= mEntries.size(); - return (mGridDimension.y * (mGridDimension.x - 2 * EXTRAITEMS)) <= mEntries.size(); + return (mGridDimension.x * (mGridDimension.y - 2 * EXTRAITEMS)) <= + static_cast(mEntries.size()); + return (mGridDimension.y * (mGridDimension.x - 2 * EXTRAITEMS)) <= + static_cast(mEntries.size()); } #endif // ES_CORE_COMPONENTS_IMAGE_GRID_COMPONENT_H diff --git a/es-core/src/components/TextEditComponent.cpp b/es-core/src/components/TextEditComponent.cpp index 51c1b7c32..a71df9cca 100644 --- a/es-core/src/components/TextEditComponent.cpp +++ b/es-core/src/components/TextEditComponent.cpp @@ -183,7 +183,7 @@ bool TextEditComponent::input(InputConfig* config, Input input) break; } case SDLK_DELETE: { - if (mCursor < mText.length()) { + if (mCursor < static_cast(mText.length())) { // Fake as Backspace one char to the right. moveCursor(1); textInput("\b"); @@ -245,7 +245,7 @@ void TextEditComponent::onTextChanged() mFont->buildTextCache(wrappedText, 0.0f, 0.0f, 0x77777700 | getOpacity())); if (mCursor > static_cast(mText.length())) - mCursor = static_cast(mText.length()); + mCursor = static_cast(mText.length()); } void TextEditComponent::onCursorChanged() diff --git a/es-core/src/components/TextEditComponent.h b/es-core/src/components/TextEditComponent.h index ab2232162..302c832f7 100644 --- a/es-core/src/components/TextEditComponent.h +++ b/es-core/src/components/TextEditComponent.h @@ -60,7 +60,7 @@ private: std::string mTextOrig; bool mFocused; bool mEditing; - unsigned int mCursor; // Cursor position in characters. + int mCursor; // Cursor position in characters. int mBlinkTime; int mCursorRepeatTimer; diff --git a/es-core/src/components/VideoFFmpegComponent.cpp b/es-core/src/components/VideoFFmpegComponent.cpp index 4173839ce..6772db296 100644 --- a/es-core/src/components/VideoFFmpegComponent.cpp +++ b/es-core/src/components/VideoFFmpegComponent.cpp @@ -529,8 +529,9 @@ void VideoFFmpegComponent::readFrames() return; if (mVideoCodecContext && mFormatContext) { - if (mVideoFrameQueue.size() < mVideoTargetQueueSize || - (mAudioStreamIndex >= 0 && mAudioFrameQueue.size() < mAudioTargetQueueSize)) { + if (static_cast(mVideoFrameQueue.size()) < mVideoTargetQueueSize || + (mAudioStreamIndex >= 0 && + static_cast(mAudioFrameQueue.size()) < mAudioTargetQueueSize)) { while ((readFrameReturn = av_read_frame(mFormatContext, mPacket)) >= 0) { if (mPacket->stream_index == mVideoStreamIndex) { if (!avcodec_send_packet(mVideoCodecContext, mPacket) && diff --git a/es-core/src/guis/GuiInputConfig.cpp b/es-core/src/guis/GuiInputConfig.cpp index 78c212051..516d17c6e 100644 --- a/es-core/src/guis/GuiInputConfig.cpp +++ b/es-core/src/guis/GuiInputConfig.cpp @@ -180,8 +180,8 @@ GuiInputConfig::GuiInputConfig(Window* window, delete this; }; - buttons.push_back(std::make_shared(mWindow, "OK", "ok", - [this, okFunction] { okFunction(); })); + buttons.push_back( + std::make_shared(mWindow, "OK", "ok", [okFunction] { okFunction(); })); mButtonGrid = makeButtonGrid(mWindow, buttons); mGrid.setEntry(mButtonGrid, glm::ivec2{0, 6}, true, false); diff --git a/es-core/src/guis/GuiInputConfig.h b/es-core/src/guis/GuiInputConfig.h index 317c2d3c5..a58524030 100644 --- a/es-core/src/guis/GuiInputConfig.h +++ b/es-core/src/guis/GuiInputConfig.h @@ -68,7 +68,6 @@ private: Input mHeldInput; int mHeldTime; int mHeldInputId; - bool mSkipAxis; }; #endif // ES_CORE_GUIS_GUI_INPUT_CONFIG_H diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp index 2e28d43fb..b6017eed1 100644 --- a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp @@ -104,7 +104,6 @@ GuiTextEditKeyboardPopup::GuiTextEditKeyboardPopup( , mDeleteRepeat{false} , mShift{false} , mAlt{false} - , mAltShift{false} , mDeleteRepeatTimer{0} , mNavigationRepeatTimer{0} , mNavigationRepeatDirX{0} diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.h b/es-core/src/guis/GuiTextEditKeyboardPopup.h index e57d17134..b8660fdf0 100644 --- a/es-core/src/guis/GuiTextEditKeyboardPopup.h +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.h @@ -100,7 +100,6 @@ private: bool mDeleteRepeat; bool mShift; bool mAlt; - bool mAltShift; int mHorizontalKeyCount; int mDeleteRepeatTimer; diff --git a/es-core/src/renderers/Renderer.cpp b/es-core/src/renderers/Renderer.cpp index b5a0ba720..4a847b11a 100644 --- a/es-core/src/renderers/Renderer.cpp +++ b/es-core/src/renderers/Renderer.cpp @@ -25,6 +25,7 @@ namespace Renderer { static std::stack clipStack; static SDL_Window* sdlWindow = nullptr; + static glm::mat4 mProjectionMatrix; static int windowWidth = 0; static int windowHeight = 0; static int screenWidth = 0; diff --git a/es-core/src/renderers/Renderer.h b/es-core/src/renderers/Renderer.h index ed6980c66..eeea8da30 100644 --- a/es-core/src/renderers/Renderer.h +++ b/es-core/src/renderers/Renderer.h @@ -48,13 +48,15 @@ namespace Renderer static std::vector sShaderProgramVector; static GLuint shaderFBO; - static glm::mat4 mProjectionMatrix; + // This is simply to get rid of a GCC false positive -Wunused-variable compiler warning. + static GLuint shaderFBODummy = shaderFBO; + static constexpr glm::mat4 getIdentity() { return glm::mat4{1.0f}; } #if !defined(NDEBUG) #define GL_CHECK_ERROR(Function) (Function, _GLCheckError(#Function)) - static void _GLCheckError(const std::string& _funcName) + static inline void _GLCheckError(const std::string& _funcName) { const GLenum errorCode = glGetError(); @@ -162,7 +164,7 @@ namespace Renderer const Renderer::shaderParameters& parameters = shaderParameters(), unsigned char* textureRGBA = nullptr); - static unsigned int getWindowFlags() { return SDL_WINDOW_OPENGL; } + static inline unsigned int getWindowFlags() { return SDL_WINDOW_OPENGL; } void setupWindow(); bool createContext(); diff --git a/es-core/src/renderers/Renderer_GL21.cpp b/es-core/src/renderers/Renderer_GL21.cpp index 4957cd436..a4c9ec5c5 100644 --- a/es-core/src/renderers/Renderer_GL21.cpp +++ b/es-core/src/renderers/Renderer_GL21.cpp @@ -456,7 +456,7 @@ namespace Renderer GL_CHECK_ERROR(glBindFramebuffer(GL_READ_FRAMEBUFFER, 0)); - for (int i = 0; i < shaderList.size(); i++) { + for (size_t i = 0; i < shaderList.size(); i++) { vertices[0].shaders = shaderList[i]; int shaderPasses = 1; // For the blur shaders there is an optional variable to set the number of passes diff --git a/es-core/src/resources/Font.cpp b/es-core/src/resources/Font.cpp index e96bf3673..5cdb52e53 100644 --- a/es-core/src/resources/Font.cpp +++ b/es-core/src/resources/Font.cpp @@ -560,17 +560,19 @@ float Font::getNewlineStartOffset(const std::string& text, case ALIGN_CENTER: { int endChar = 0; endChar = static_cast(text.find('\n', charStart)); - return (xLen - sizeText(text.substr(charStart, endChar != std::string::npos ? - endChar - charStart : - endChar)) + return (xLen - sizeText(text.substr(charStart, + static_cast(endChar) != std::string::npos ? + endChar - charStart : + endChar)) .x) / 2.0f; } case ALIGN_RIGHT: { int endChar = static_cast(text.find('\n', charStart)); - return xLen - (sizeText(text.substr(charStart, endChar != std::string::npos ? - endChar - charStart : - endChar)) + return xLen - (sizeText(text.substr(charStart, + static_cast(endChar) != std::string::npos ? + endChar - charStart : + endChar)) .x); } default: diff --git a/es-core/src/utils/TimeUtil.cpp b/es-core/src/utils/TimeUtil.cpp index ef829d351..4289ba97c 100644 --- a/es-core/src/utils/TimeUtil.cpp +++ b/es-core/src/utils/TimeUtil.cpp @@ -18,7 +18,7 @@ namespace Utils DateTime::DateTime() { mTime = 0; - mTimeStruct = {0, 0, 0, 1, 0, 0, 0, 0, -1}; + mTimeStruct = {0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0}; mIsoString = "00000000T000000"; } @@ -83,7 +83,7 @@ namespace Utils { const char* s = string.c_str(); const char* f = format.c_str(); - tm timeStruct = {0, 0, 0, 1, 0, 0, 0, 0, -1}; + tm timeStruct = {0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0}; size_t parsedChars = 0; if (string == "19700101T010000") @@ -231,7 +231,7 @@ namespace Utils int daysInMonth(const int year, const int month) { - tm timeStruct = {0, 0, 0, 0, month, year - 1900, 0, 0, -1}; + tm timeStruct = {0, 0, 0, 0, month, year - 1900, 0, 0, -1, 0, 0}; mktime(&timeStruct); return timeStruct.tm_mday; @@ -239,7 +239,7 @@ namespace Utils int daysInYear(const int year) { - tm timeStruct = {0, 0, 0, 0, 0, year - 1900 + 1, 0, 0, -1}; + tm timeStruct = {0, 0, 0, 0, 0, year - 1900 + 1, 0, 0, -1, 0, 0}; mktime(&timeStruct); return timeStruct.tm_yday + 1; diff --git a/es-core/src/utils/TimeUtil.h b/es-core/src/utils/TimeUtil.h index a92d4edd2..3c0d0489a 100644 --- a/es-core/src/utils/TimeUtil.h +++ b/es-core/src/utils/TimeUtil.h @@ -20,7 +20,7 @@ namespace Utils { namespace Time { - static int DEFAULT_TIMEVALUE = 0; + constexpr static int DEFAULT_TIMEVALUE = 0; class DateTime { From dd8f5afdf45abafdf4f63def7f442e6565d59775 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 14:57:54 +0200 Subject: [PATCH 22/64] (Windows) Fixed some compiler errors and a compiler warning. --- es-core/src/Window.cpp | 4 ++-- es-core/src/utils/TimeUtil.cpp | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index 6ca4dce4e..f23d9f96d 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -664,10 +664,10 @@ void Window::setHelpPrompts(const std::vector& prompts, const HelpSt "lt", "start", "back"}; - size_t i = 0; + int i = 0; int aVal = 0; int bVal = 0; - while (i < map.size()) { + while (i < static_cast(map.size())) { if (a.first == map[i]) aVal = i; if (b.first == map[i]) diff --git a/es-core/src/utils/TimeUtil.cpp b/es-core/src/utils/TimeUtil.cpp index 4289ba97c..40ba11bd3 100644 --- a/es-core/src/utils/TimeUtil.cpp +++ b/es-core/src/utils/TimeUtil.cpp @@ -18,7 +18,11 @@ namespace Utils DateTime::DateTime() { mTime = 0; +#if defined(_WIN64) + mTimeStruct = {0, 0, 0, 1, 0, 0, 0, 0, -1}; +#else mTimeStruct = {0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0}; +#endif mIsoString = "00000000T000000"; } @@ -83,7 +87,11 @@ namespace Utils { const char* s = string.c_str(); const char* f = format.c_str(); +#if defined(_WIN64) + tm timeStruct = {0, 0, 0, 1, 0, 0, 0, 0, -1}; +#else tm timeStruct = {0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0}; +#endif size_t parsedChars = 0; if (string == "19700101T010000") @@ -231,7 +239,11 @@ namespace Utils int daysInMonth(const int year, const int month) { +#if defined(_WIN64) + tm timeStruct = {0, 0, 0, 0, month, year - 1900, 0, 0, -1}; +#else tm timeStruct = {0, 0, 0, 0, month, year - 1900, 0, 0, -1, 0, 0}; +#endif mktime(&timeStruct); return timeStruct.tm_mday; @@ -239,7 +251,11 @@ namespace Utils int daysInYear(const int year) { +#if defined(_WIN64) + tm timeStruct = {0, 0, 0, 0, 0, year - 1900 + 1, 0, 0, -1}; +#else tm timeStruct = {0, 0, 0, 0, 0, year - 1900 + 1, 0, 0, -1, 0, 0}; +#endif mktime(&timeStruct); return timeStruct.tm_yday + 1; From e30cad2e9f208d9e4f1a57cd479436533da788f7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 15:02:13 +0200 Subject: [PATCH 23/64] Added the -Wall, -Wpedantic and some additional compiler flags. Also increased the minimum Clang and GCC compiler versions. --- CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcf598406..1f01702e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,14 +108,14 @@ endif() if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") message("-- Compiler is Clang/LLVM") execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CLANG_VERSION) - if(CLANG_VERSION VERSION_LESS 4.2.1) - message(SEND_ERROR "You need at least Clang 4.2.1 to compile EmulationStation-DE") + if(CLANG_VERSION VERSION_LESS 5.0.0) + message(SEND_ERROR "You need at least Clang 5.0.0 to compile EmulationStation-DE") endif() elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") message("-- Compiler is GNU/GCC") execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpfullversion OUTPUT_VARIABLE G++_VERSION) - if(G++_VERSION VERSION_LESS 5.4) - message(SEND_ERROR "You need at least GCC 5.4 to compile EmulationStation-DE") + if(G++_VERSION VERSION_LESS 7.1) + message(SEND_ERROR "You need at least GCC 7.1 to compile EmulationStation-DE") endif() if(WIN32) set(CMAKE_CXX_FLAGS "-mwindows ${CMAKE_CXX_FLAGS}") @@ -136,7 +136,7 @@ if(CMAKE_BUILD_TYPE MATCHES Debug) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /Od /DEBUG:FULL") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O0 -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O0") endif() # If using Clang, then add additional debug data needed by GDB. @@ -151,7 +151,7 @@ elseif(CMAKE_BUILD_TYPE MATCHES Profiling) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /O2 /DEBUG:FULL") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -pg -g") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -pg -g -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2 -pg") endif() else() @@ -160,7 +160,7 @@ else() if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG /std:c++17 /O2 /DEBUG:NONE") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -DNDEBUG") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -DNDEBUG -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers") if(APPLE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2") else() From 970b7dd63d33ced06c318a99fdad1a7b1cf384bd Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 15:27:32 +0200 Subject: [PATCH 24/64] (Windows) Fixed some MinGW compiler warnings. --- es-app/src/VolumeControl.cpp | 6 ++++-- es-app/src/main.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/es-app/src/VolumeControl.cpp b/es-app/src/VolumeControl.cpp index 18fd01b0d..2d865867d 100644 --- a/es-app/src/VolumeControl.cpp +++ b/es-app/src/VolumeControl.cpp @@ -131,9 +131,10 @@ void VolumeControl::init() // Retrieve endpoint volume. defaultDevice->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, nullptr, reinterpret_cast(&endpointVolume)); - if (endpointVolume == nullptr) + if (endpointVolume == nullptr) { LOG(LogError) << "VolumeControl::init(): " "Failed to get default audio endpoint volume!"; + } // Release default device. we don't need it anymore. defaultDevice->Release(); } @@ -245,8 +246,9 @@ void VolumeControl::setVolume(int volume) float floatVolume = 0.0f; // 0-1 if (volume > 0) floatVolume = static_cast(volume) / 100.0f; - if (endpointVolume->SetMasterVolumeLevelScalar(floatVolume, nullptr) != S_OK) + if (endpointVolume->SetMasterVolumeLevelScalar(floatVolume, nullptr) != S_OK) { LOG(LogError) << "VolumeControl::setVolume(): Failed to set master volume"; + } } #endif } diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index db3544b91..86e9bf385 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -132,7 +132,7 @@ bool parseArgs(int argc, char* argv[]) #if defined(_WIN64) // Print any command line output to the console. if (argc > 1) - win64ConsoleType consoleType = outputToConsole(false); + outputToConsole(false); #endif std::string portableFilePath = Utils::FileSystem::getExePath() + "/portable.txt"; From dacda901867a2634bcbc8ec80379f9454406e99e Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 15:55:47 +0200 Subject: [PATCH 25/64] Made CMake use a more reliable way for detecting the compiler version. --- CMakeLists.txt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f01702e9..5bf8cc34a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ option(CEC "Set to ON to enable CEC" ${CEC}) option(VLC_PLAYER "Set to ON to build the VLC-based video player" ${VLC_PLAYER}) option(CLANG_TIDY "Set to ON to build using the clang-tidy static analyzer" ${CLANG_TIDY}) -if (CLANG_TIDY) +if(CLANG_TIDY) find_program(CLANG_TIDY_BINARY NAMES clang-tidy) if("${CLANG_TIDY_BINARY}" STREQUAL "CLANG_TIDY_BINARY-NOTFOUND") message("-- CLANG_TIDY was set but the clang-tidy binary was not found") @@ -107,14 +107,12 @@ endif() if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") message("-- Compiler is Clang/LLVM") - execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CLANG_VERSION) - if(CLANG_VERSION VERSION_LESS 5.0.0) + if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 5.0.0) message(SEND_ERROR "You need at least Clang 5.0.0 to compile EmulationStation-DE") endif() elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") message("-- Compiler is GNU/GCC") - execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpfullversion OUTPUT_VARIABLE G++_VERSION) - if(G++_VERSION VERSION_LESS 7.1) + if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 7.1) message(SEND_ERROR "You need at least GCC 7.1 to compile EmulationStation-DE") endif() if(WIN32) @@ -126,7 +124,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") add_definitions(-DNOMINMAX) endif() -if (CMAKE_BUILD_TYPE) +if(CMAKE_BUILD_TYPE) message("-- Build type is ${CMAKE_BUILD_TYPE}") endif() @@ -194,7 +192,7 @@ else() add_definitions(-DUSE_OPENGLES_10) endif() -if (VLC_PLAYER) +if(VLC_PLAYER) add_definitions(-DBUILD_VLC_PLAYER) endif() From fc78f8ee186241450df1ee8c071d08cfaa139094 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 18:53:20 +0200 Subject: [PATCH 26/64] General cleanup of the CMake configuration files. --- CMakeLists.txt | 178 +++++++++++---------- es-app/CMakeLists.txt | 340 ++++++++++++++++++++++------------------- es-core/CMakeLists.txt | 262 +++++++++++++++---------------- 3 files changed, 400 insertions(+), 380 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bf8cc34a..68fc3a983 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,9 +25,8 @@ set(CMAKE_VERBOSE_MAKEFILE OFF CACHE BOOL "Show verbose compiler output" FORCE) set(LINUX_CPACK_GENERATOR "DEB" CACHE STRING "CPack generator, DEB or RPM") # Add local find modules to the CMake path. -list(APPEND CMAKE_MODULE_PATH - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Utils - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Packages) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Utils + ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Packages) # Define the options. option(GLES "Set to ON if targeting Embedded OpenGL" ${GLES}) @@ -39,14 +38,20 @@ option(CLANG_TIDY "Set to ON to build using the clang-tidy static analyzer" ${CL if(CLANG_TIDY) find_program(CLANG_TIDY_BINARY NAMES clang-tidy) - if("${CLANG_TIDY_BINARY}" STREQUAL "CLANG_TIDY_BINARY-NOTFOUND") + if(CLANG_TIDY_BINARY STREQUAL "CLANG_TIDY_BINARY-NOTFOUND") message("-- CLANG_TIDY was set but the clang-tidy binary was not found") else() message("-- Building with the clang-tidy static analyzer") - set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*,-fuchsia-*,-hicpp-*,-llvm-*, \ - -readability-braces-*,-google-readability-braces-*, \ - -readability-uppercase-literal-suffix,-modernize-use-trailing-return-type, \ - -cppcoreguidelines-avoid-magic-numbers,-readability-magic-numbers") + set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*,\ + -fuchsia-*,\ + -hicpp-*,\ + -llvm-*,\ + -readability-braces-*,\ + -google-readability-braces-*,\ + -readability-uppercase-literal-suffix,\ + -modernize-use-trailing-return-type,\ + -cppcoreguidelines-avoid-magic-numbers,\ + -readability-magic-numbers") endif() endif() @@ -59,19 +64,19 @@ if(EXISTS "${CMAKE_FIND_ROOT_PATH}/opt/vc/include/bcm_host.h") # Setting BCMHOST seems to break OpenGL ES on the RPi 4 so set RPI instead. #set(BCMHOST found) set(RPI ON) - set(GLSystem "Embedded OpenGL" CACHE STRING "The OpenGL system to be used") + set(GLSYSTEM "Embedded OpenGL" CACHE STRING "The OpenGL system to be used") elseif(GLES OR RPI) - set(GLSystem "Embedded OpenGL" CACHE STRING "The OpenGL system to be used") + set(GLSYSTEM "Embedded OpenGL" CACHE STRING "The OpenGL system to be used") else() - set(GLSystem "Desktop OpenGL" CACHE STRING "The OpenGL system to be used") + set(GLSYSTEM "Desktop OpenGL" CACHE STRING "The OpenGL system to be used") endif() -set_property(CACHE GLSystem PROPERTY STRINGS "Desktop OpenGL" "Embedded OpenGL") +set_property(CACHE GLSYSTEM PROPERTY STRINGS "Desktop OpenGL" "Embedded OpenGL") #--------------------------------------------------------------------------------------------------- # Package dependencies. -if(${GLSystem} MATCHES "Desktop OpenGL") +if(GLSYSTEM MATCHES "Desktop OpenGL") set(OpenGL_GL_PREFERENCE "GLVND") find_package(OpenGL REQUIRED) else() @@ -98,27 +103,27 @@ if(CEC) endif() # Add ALSA for Linux. -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") +if(CMAKE_SYSTEM_NAME MATCHES "Linux") find_package(ALSA REQUIRED) endif() #--------------------------------------------------------------------------------------------------- # Compiler and linker settings. -if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") message("-- Compiler is Clang/LLVM") - if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 5.0.0) + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0.0) message(SEND_ERROR "You need at least Clang 5.0.0 to compile EmulationStation-DE") endif() -elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") message("-- Compiler is GNU/GCC") - if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 7.1) + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.1) message(SEND_ERROR "You need at least GCC 7.1 to compile EmulationStation-DE") endif() if(WIN32) set(CMAKE_CXX_FLAGS "-mwindows ${CMAKE_CXX_FLAGS}") endif() -elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") message("-- Compiler is MSVC") # If using the MSVC compiler on Windows, disable the built-in min() and max() macros. add_definitions(-DNOMINMAX) @@ -131,7 +136,7 @@ endif() # Set up compiler and linker flags for debug, profiling or release builds. if(CMAKE_BUILD_TYPE MATCHES Debug) # Enable the C++17 standard and disable optimizations as it's a debug build. - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /Od /DEBUG:FULL") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O0 -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers") @@ -141,12 +146,12 @@ if(CMAKE_BUILD_TYPE MATCHES Debug) # Comment this out if you're using LLDB for debugging as this flag makes the binary # much larger and the application much slower. On macOS this setting is never enabled # as LLDB is the default debugger on this OS. - if(NOT APPLE AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + if(NOT APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_DEBUG") endif() elseif(CMAKE_BUILD_TYPE MATCHES Profiling) # For the profiling build, we enable optimizations and supply the required profiler flags. - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /O2 /DEBUG:FULL") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -pg -g -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers") @@ -155,7 +160,7 @@ elseif(CMAKE_BUILD_TYPE MATCHES Profiling) else() # Enable the C++17 standard and enable optimizations as it's a release build. # This will also disable all assert() macros. Strip the binary too. - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG /std:c++17 /O2 /DEBUG:NONE") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -DNDEBUG -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers") @@ -178,7 +183,7 @@ if(APPLE) if(MACOS_CODESIGN_IDENTITY) message("-- Code signing certificate identity: " ${MACOS_CODESIGN_IDENTITY}) endif() - if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.14) + if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.14) message("-- macOS version 10.13 or lower has been set, so if code signing is enabled, Hardened Runtime will not be used") endif() endif() @@ -186,7 +191,7 @@ endif() #--------------------------------------------------------------------------------------------------- # Preprocessor directives. -if(${GLSystem} MATCHES "Desktop OpenGL") +if(GLSYSTEM MATCHES "Desktop OpenGL") add_definitions(-DUSE_OPENGL_21) else() add_definitions(-DUSE_OPENGLES_10) @@ -212,9 +217,9 @@ add_definitions(-DGLM_FORCE_XYZW_ONLY) # we use /usr on Linux, /usr/pkg on NetBSD and /usr/local on FreeBSD and OpenBSD. if(NOT WIN32 AND NOT APPLE) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + if(CMAKE_SYSTEM_NAME MATCHES "Linux") set(CMAKE_INSTALL_PREFIX "/usr" CACHE INTERNAL "CMAKE_INSTALL_PREFIX") - elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") set(CMAKE_INSTALL_PREFIX "/usr/pkg" CACHE INTERNAL "CMAKE_INSTALL_PREFIX") else() set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE INTERNAL "CMAKE_INSTALL_PREFIX") @@ -233,18 +238,17 @@ endif() #--------------------------------------------------------------------------------------------------- # Include files. -set(COMMON_INCLUDE_DIRS - ${CURL_INCLUDE_DIR} - ${FFMPEG_INCLUDE_DIRS} - ${FreeImage_INCLUDE_DIRS} - ${FREETYPE_INCLUDE_DIRS} - ${PUGIXML_INCLUDE_DIRS} - ${RAPIDJSON_INCLUDE_DIRS} - ${SDL2_INCLUDE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/external/CImg - ${CMAKE_CURRENT_SOURCE_DIR}/external/glm - ${CMAKE_CURRENT_SOURCE_DIR}/external/nanosvg/src - ${CMAKE_CURRENT_SOURCE_DIR}/es-core/src) +set(COMMON_INCLUDE_DIRS ${CURL_INCLUDE_DIR} + ${FFMPEG_INCLUDE_DIRS} + ${FreeImage_INCLUDE_DIRS} + ${FREETYPE_INCLUDE_DIRS} + ${PUGIXML_INCLUDE_DIRS} + ${RAPIDJSON_INCLUDE_DIRS} + ${SDL2_INCLUDE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/external/CImg + ${CMAKE_CURRENT_SOURCE_DIR}/external/glm + ${CMAKE_CURRENT_SOURCE_DIR}/external/nanosvg/src + ${CMAKE_CURRENT_SOURCE_DIR}/es-core/src) if(VLC_PLAYER) set(COMMON_INCLUDE_DIRS ${COMMON_INCLUDE_DIRS} ${VLC_INCLUDE_DIR}) endif() @@ -272,69 +276,65 @@ if(DEFINED libCEC_FOUND) endif() # For Linux, add the ALSA include directory. -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") +if(CMAKE_SYSTEM_NAME MATCHES "Linux") list(APPEND COMMON_INCLUDE_DIRS ${ALSA_INCLUDE_DIRS}) endif() if(DEFINED BCMHOST OR RPI) - list(APPEND COMMON_INCLUDE_DIRS - "${CMAKE_FIND_ROOT_PATH}/opt/vc/include" - "${CMAKE_FIND_ROOT_PATH}/opt/vc/include/interface/vcos" - "${CMAKE_FIND_ROOT_PATH}/opt/vc/include/interface/vmcs_host/linux" - "${CMAKE_FIND_ROOT_PATH}/opt/vc/include/interface/vcos/pthreads") + list(APPEND COMMON_INCLUDE_DIRS "${CMAKE_FIND_ROOT_PATH}/opt/vc/include" + "${CMAKE_FIND_ROOT_PATH}/opt/vc/include/interface/vcos" + "${CMAKE_FIND_ROOT_PATH}/opt/vc/include/interface/vmcs_host/linux" + "${CMAKE_FIND_ROOT_PATH}/opt/vc/include/interface/vcos/pthreads") endif() #--------------------------------------------------------------------------------------------------- # Dependency libraries. if(NOT WIN32) - set(COMMON_LIBRARIES - ${CURL_LIBRARIES} - ${FFMPEG_LIBRARIES} - ${FreeImage_LIBRARIES} - ${FREETYPE_LIBRARIES} - ${PUGIXML_LIBRARIES} - ${SDL2_LIBRARY}) + set(COMMON_LIBRARIES ${CURL_LIBRARIES} + ${FFMPEG_LIBRARIES} + ${FreeImage_LIBRARIES} + ${FREETYPE_LIBRARIES} + ${PUGIXML_LIBRARIES} + ${SDL2_LIBRARY}) if(VLC_PLAYER) set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${VLC_LIBRARIES}) endif() elseif(WIN32) if(DEFINED MSVC) - set(COMMON_LIBRARIES - "${PROJECT_SOURCE_DIR}/avcodec.lib" - "${PROJECT_SOURCE_DIR}/avfilter.lib" - "${PROJECT_SOURCE_DIR}/avformat.lib" - "${PROJECT_SOURCE_DIR}/avutil.lib" - "${PROJECT_SOURCE_DIR}/swresample.lib" - "${PROJECT_SOURCE_DIR}/swscale.lib" - "${PROJECT_SOURCE_DIR}/FreeImage.lib" - "${PROJECT_SOURCE_DIR}/glew32.lib" - "${PROJECT_SOURCE_DIR}/libcurl-x64.lib" - "${PROJECT_SOURCE_DIR}/freetype.lib" - "${PROJECT_SOURCE_DIR}/pugixml.lib" - "${PROJECT_SOURCE_DIR}/SDL2main.lib" - "${PROJECT_SOURCE_DIR}/SDL2.lib" - "Winmm.dll") + set(COMMON_LIBRARIES "${PROJECT_SOURCE_DIR}/avcodec.lib" + "${PROJECT_SOURCE_DIR}/avfilter.lib" + "${PROJECT_SOURCE_DIR}/avformat.lib" + "${PROJECT_SOURCE_DIR}/avutil.lib" + "${PROJECT_SOURCE_DIR}/swresample.lib" + "${PROJECT_SOURCE_DIR}/swscale.lib" + "${PROJECT_SOURCE_DIR}/FreeImage.lib" + "${PROJECT_SOURCE_DIR}/glew32.lib" + "${PROJECT_SOURCE_DIR}/libcurl-x64.lib" + "${PROJECT_SOURCE_DIR}/freetype.lib" + "${PROJECT_SOURCE_DIR}/pugixml.lib" + "${PROJECT_SOURCE_DIR}/SDL2main.lib" + "${PROJECT_SOURCE_DIR}/SDL2.lib" + "Winmm.dll") if(VLC_PLAYER) set(COMMON_LIBRARIES ${COMMON_LIBRARIES} "${PROJECT_SOURCE_DIR}/libvlc.lib") endif() else() - set(COMMON_LIBRARIES - "${PROJECT_SOURCE_DIR}/avcodec-58.dll" - "${PROJECT_SOURCE_DIR}/avfilter-7.dll" - "${PROJECT_SOURCE_DIR}/avformat-58.dll" - "${PROJECT_SOURCE_DIR}/avutil-56.dll" - "${PROJECT_SOURCE_DIR}/swresample-3.dll" - "${PROJECT_SOURCE_DIR}/swscale-5.dll" - "${PROJECT_SOURCE_DIR}/FreeImage.dll" - "${PROJECT_SOURCE_DIR}/glew32.dll" - "${PROJECT_SOURCE_DIR}/libcurl-x64.dll" - "${PROJECT_SOURCE_DIR}/libfreetype.dll" - "${PROJECT_SOURCE_DIR}/libpugixml.dll" - "${PROJECT_SOURCE_DIR}/libSDL2main.a" - "${PROJECT_SOURCE_DIR}/SDL2.dll" - "mingw32" - "Winmm.dll") + set(COMMON_LIBRARIES "${PROJECT_SOURCE_DIR}/avcodec-58.dll" + "${PROJECT_SOURCE_DIR}/avfilter-7.dll" + "${PROJECT_SOURCE_DIR}/avformat-58.dll" + "${PROJECT_SOURCE_DIR}/avutil-56.dll" + "${PROJECT_SOURCE_DIR}/swresample-3.dll" + "${PROJECT_SOURCE_DIR}/swscale-5.dll" + "${PROJECT_SOURCE_DIR}/FreeImage.dll" + "${PROJECT_SOURCE_DIR}/glew32.dll" + "${PROJECT_SOURCE_DIR}/libcurl-x64.dll" + "${PROJECT_SOURCE_DIR}/libfreetype.dll" + "${PROJECT_SOURCE_DIR}/libpugixml.dll" + "${PROJECT_SOURCE_DIR}/libSDL2main.a" + "${PROJECT_SOURCE_DIR}/SDL2.dll" + "mingw32" + "Winmm.dll") if(VLC_PLAYER) set(COMMON_LIBRARIES ${COMMON_LIBRARIES} "${PROJECT_SOURCE_DIR}/libvlc.dll") endif() @@ -342,15 +342,13 @@ elseif(WIN32) endif() if(APPLE) - # See es-app/CMakeLists.txt for an explation for why an extra 'Resources' directory + # See es-app/CMakeLists.txt for an explation for why an extra "Resources" directory # has been added to the install prefix. - set(CMAKE_INSTALL_PREFIX - "/Applications/EmulationStation Desktop Edition.app/Contents/Resources") + set(CMAKE_INSTALL_PREFIX "/Applications/EmulationStation Desktop Edition.app/Contents/Resources") if(VLC_PLAYER) # Required as the VLC find module doesn't work properly on macOS. - set(COMMON_LIBRARIES ${COMMON_LIBRARIES} - "/Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib") + set(COMMON_LIBRARIES ${COMMON_LIBRARIES} "/Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib") endif() # Set the same rpath links for the install executable as for the build executable. @@ -368,7 +366,7 @@ if(DEFINED libCEC_FOUND) endif() # Add ALSA for Linux libraries. -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") +if(CMAKE_SYSTEM_NAME MATCHES "Linux") list(APPEND COMMON_LIBRARIES ${ALSA_LIBRARY}) endif() @@ -380,7 +378,7 @@ elseif(RPI) list(APPEND COMMON_LIBRARIES ${OPENGLES_LIBRARIES}) endif() -if(${GLSystem} MATCHES "Desktop OpenGL") +if(GLSYSTEM MATCHES "Desktop OpenGL") list(APPEND COMMON_LIBRARIES ${OPENGL_LIBRARIES}) else() list(APPEND COMMON_LIBRARIES EGL ${OPENGLES_LIBRARIES}) diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index 80eb81d58..9f4dbe7e1 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -10,105 +10,105 @@ project("emulationstation-de") set(ES_HEADERS - ${CMAKE_CURRENT_SOURCE_DIR}/src/CollectionSystemsManager.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/FileFilterIndex.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/MediaViewer.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/MiximageGenerator.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemScreensaver.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/CollectionSystemsManager.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/EmulationStation.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileFilterIndex.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/MediaViewer.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/MiximageGenerator.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemScreensaver.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.h - # GUIs - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiAlternativeEmulators.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInfoPopup.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiLaunchScreen.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiOfflineGenerator.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScreensaverOptions.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h + # GUIs + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiAlternativeEmulators.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInfoPopup.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiLaunchScreen.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiOfflineGenerator.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScreensaverOptions.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.h - # Scrapers - ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBJSONScraper.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBJSONScraperResources.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/ScreenScraper.h + # Scrapers + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBJSONScraper.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBJSONScraperResources.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/ScreenScraper.h - # Views - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/VideoGameListView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/UIModeController.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.h + # Views + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/VideoGameListView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/UIModeController.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.h ) set(ES_SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/src/CollectionSystemsManager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/FileFilterIndex.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/MediaViewer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/MiximageGenerator.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemScreensaver.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/CollectionSystemsManager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileData.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileFilterIndex.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/FileSorts.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/Gamelist.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/MediaViewer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/MetaData.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/MiximageGenerator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/PlatformId.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/SystemScreensaver.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.cpp - # GUIs - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiAlternativeEmulators.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInfoPopup.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiLaunchScreen.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiOfflineGenerator.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScreensaverOptions.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp + # GUIs + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiAlternativeEmulators.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiCollectionSystemsOptions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistFilter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGamelistOptions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiGameScraper.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInfoPopup.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiLaunchScreen.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMenu.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMediaViewerOptions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMetaDataEd.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiOfflineGenerator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMenu.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperMulti.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScraperSearch.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiScreensaverOptions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiSettings.cpp - # Scrapers - ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBJSONScraper.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBJSONScraperResources.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/ScreenScraper.cpp + # Scrapers + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBJSONScraper.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBJSONScraperResources.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/Scraper.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/ScreenScraper.cpp - # Views - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/VideoGameListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/UIModeController.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.cpp + # Views + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/BasicGameListView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/DetailedGameListView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/GridGameListView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/IGameListView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/ISimpleGameListView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/gamelist/VideoGameListView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/SystemView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/UIModeController.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/views/ViewController.cpp ) if(WIN32) @@ -134,20 +134,48 @@ endif() # Setup for installation and package generation. if(WIN32) install(TARGETS EmulationStation RUNTIME DESTINATION .) - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - install(FILES ../avcodec-58.dll ../avfilter-7.dll ../avformat-58.dll ../avutil-56.dll - ../postproc-55.dll ../swresample-3.dll ../swscale-5.dll ../FreeImage.dll - ../glew32.dll ../libcrypto-1_1-x64.dll ../libcurl-x64.dll ../freetype.dll - ../pugixml.dll ../libssl-1_1-x64.dll ../SDL2.dll ../MSVCP140.dll ../VCOMP140.DLL - ../VCRUNTIME140.dll ../VCRUNTIME140_1.dll DESTINATION .) + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + install(FILES ../avcodec-58.dll + ../avfilter-7.dll + ../avformat-58.dll + ../avutil-56.dll + ../postproc-55.dll + ../swresample-3.dll + ../swscale-5.dll + ../FreeImage.dll + ../freetype.dll + ../glew32.dll + ../libcrypto-1_1-x64.dll + ../libcurl-x64.dll + ../libssl-1_1-x64.dll + ../MSVCP140.dll + ../pugixml.dll + ../SDL2.dll + ../VCOMP140.DLL + ../VCRUNTIME140.dll + ../VCRUNTIME140_1.dll + DESTINATION .) if(VLC_PLAYER) install(FILES ../libvlc.dll ../libvlccore.dll DESTINATION .) endif() else() - install(FILES ../avcodec-58.dll ../avfilter-7.dll ../avformat-58.dll ../avutil-56.dll - ../postproc-55.dll ../swresample-3.dll ../swscale-5.dll ../FreeImage.dll - ../glew32.dll ../libcrypto-1_1-x64.dll ../libcurl-x64.dll ../libfreetype.dll - ../libpugixml.dll ../libssl-1_1-x64.dll ../SDL2.dll ../vcomp140.dll DESTINATION .) + install(FILES ../avcodec-58.dll + ../avfilter-7.dll + ../avformat-58.dll + ../avutil-56.dll + ../postproc-55.dll + ../swresample-3.dll + ../swscale-5.dll + ../FreeImage.dll + ../glew32.dll + ../libcrypto-1_1-x64.dll + ../libcurl-x64.dll + ../libfreetype.dll + ../libpugixml.dll + ../libssl-1_1-x64.dll + ../SDL2.dll + ../vcomp140.dll + DESTINATION .) if(VLC_PLAYER) install(FILES ../libvlc.dll ../libvlccore.dll DESTINATION .) endif() @@ -166,12 +194,9 @@ elseif(APPLE) # So an extra 'Resources' directory was added to the CMAKE_INSTALL_PREFIX variable as well # to compensate for this. It's a bad solution to the problem and there must surely be a # better way to fix this. - install(TARGETS EmulationStation RUNTIME - DESTINATION ../MacOS) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns - DESTINATION ../Resources) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE_Info.plist - DESTINATION .. RENAME Info.plist) + install(TARGETS EmulationStation RUNTIME DESTINATION ../MacOS) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns DESTINATION ../Resources) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE_Info.plist DESTINATION .. RENAME Info.plist) # Another hack/workaround. I have not been able to find any way whatsover to force the # linker to use rpaths for all shared libraries instead of absolute paths. So instead @@ -181,84 +206,81 @@ elseif(APPLE) # on your system (e.g. if using libSDL2-2.1.0.dylib instead of libSDL2-2.0.0.dylib). # This problem definitely needs to be resolved properly at a later date. add_custom_command(TARGET EmulationStation POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} - -change /usr/local/lib/libavcodec.58.dylib @rpath/libavcodec.58.dylib - -change /usr/local/lib/libavfilter.7.dylib @rpath/libavfilter.7.dylib - -change /usr/local/lib/libavformat.58.dylib @rpath/libavformat.58.dylib - -change /usr/local/lib/libavutil.56.dylib @rpath/libavutil.56.dylib - -change /usr/local/lib/libswresample.3.dylib @rpath/libswresample.3.dylib - -change /usr/local/lib/libswscale.5.dylib @rpath/libswscale.5.dylib - -change /usr/local/opt/freeimage/lib/libfreeimage.dylib @rpath/libfreeimage.dylib - -change /usr/local/opt/freetype/lib/libfreetype.6.dylib @rpath/libfreetype.6.dylib - -change /usr/local/opt/libpng/lib/libpng16.16.dylib @rpath/libpng16.16.dylib - -change /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib @rpath/libSDL2-2.0.0.dylib - $) - set(APPLE_DYLIB_PERMISSIONS - OWNER_WRITE OWNER_READ OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE) + -change /usr/local/lib/libavcodec.58.dylib @rpath/libavcodec.58.dylib + -change /usr/local/lib/libavfilter.7.dylib @rpath/libavfilter.7.dylib + -change /usr/local/lib/libavformat.58.dylib @rpath/libavformat.58.dylib + -change /usr/local/lib/libavutil.56.dylib @rpath/libavutil.56.dylib + -change /usr/local/lib/libswresample.3.dylib @rpath/libswresample.3.dylib + -change /usr/local/lib/libswscale.5.dylib @rpath/libswscale.5.dylib + -change /usr/local/opt/freeimage/lib/libfreeimage.dylib @rpath/libfreeimage.dylib + -change /usr/local/opt/freetype/lib/libfreetype.6.dylib @rpath/libfreetype.6.dylib + -change /usr/local/opt/libpng/lib/libpng16.16.dylib @rpath/libpng16.16.dylib + -change /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib @rpath/libSDL2-2.0.0.dylib + $) + + set(APPLE_DYLIB_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE) install(FILES ${CMAKE_SOURCE_DIR}/libavcodec.58.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libavfilter.7.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libavformat.58.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libavutil.56.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libpostproc.55.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libswresample.3.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libswscale.5.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libfdk-aac.2.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libfreeimage.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libfreetype.6.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libpng16.16.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libSDL2-2.0.0.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + if(VLC_PLAYER) install(FILES ${CMAKE_SOURCE_DIR}/libvlc.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libvlccore.dylib - PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(DIRECTORY ${CMAKE_SOURCE_DIR}/plugins - DESTINATION ../MacOS) + DESTINATION ../MacOS) endif() - install(FILES ${CMAKE_SOURCE_DIR}/LICENSE - DESTINATION ../Resources) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources - DESTINATION ../Resources) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes - DESTINATION ../Resources) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/licenses - DESTINATION ../Resources) + + install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ../Resources) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources DESTINATION ../Resources) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION ../Resources) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/licenses DESTINATION ../Resources) else() - install(TARGETS emulationstation RUNTIME - DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) - if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + install(TARGETS emulationstation RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) + if(CMAKE_SYSTEM_NAME MATCHES "Linux") install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/emulationstation.6.gz - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man6) + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man6) else() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/emulationstation.6.gz - DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man6) + DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man6) endif() install(FILES ${CMAKE_SOURCE_DIR}/LICENSE - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/emulationstation.desktop - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/emulationstation.svg - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps) + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps) install(DIRECTORY ${CMAKE_SOURCE_DIR}/licenses - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) endif() include(InstallRequiredSystemLibraries) @@ -295,7 +317,7 @@ endif() # Settings per operating system and generator type. if(APPLE) set(CPACK_GENERATOR "Bundle") - if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.14) + if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.14) set(CPACK_PACKAGE_FILE_NAME "EmulationStation-DE-${CPACK_PACKAGE_VERSION}-${CPU_ARCHITECTURE}_legacy") set(CPACK_DMG_VOLUME_NAME "EmulationStation Desktop Edition ${CPACK_PACKAGE_VERSION}_legacy") else() @@ -309,7 +331,7 @@ if(APPLE) set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE_Info.plist") if(MACOS_CODESIGN_IDENTITY) set(CPACK_BUNDLE_APPLE_CERT_APP "Developer ID Application: ${MACOS_CODESIGN_IDENTITY}") - if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_GREATER 10.13) + if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.13) set(CPACK_BUNDLE_APPLE_CODESIGN_PARAMETER "--deep --force --options runtime") endif() endif() @@ -332,7 +354,7 @@ elseif(WIN32) else() set(CPACK_PACKAGE_INSTALL_DIRECTORY "emulationstation_${CMAKE_PACKAGE_VERSION}") set(CPACK_PACKAGE_EXECUTABLES "emulationstation" "emulationstation") - if("${LINUX_CPACK_GENERATOR}" STREQUAL "DEB") + if(LINUX_CPACK_GENERATOR STREQUAL "DEB") set(CPACK_GENERATOR "DEB") endif() set(CPACK_DEBIAN_FILE_NAME "emulationstation-de-${CPACK_PACKAGE_VERSION}-${CPU_ARCHITECTURE}.deb") @@ -344,7 +366,7 @@ else() set(CPACK_DEBIAN_PACKAGE_DEPENDS "vlc") endif() set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) - if("${LINUX_CPACK_GENERATOR}" STREQUAL "RPM") + if(LINUX_CPACK_GENERATOR STREQUAL "RPM") set(CPACK_GENERATOR "RPM") endif() set(CPACK_RPM_FILE_NAME "emulationstation-de-${CPACK_PACKAGE_VERSION}-${CPU_ARCHITECTURE}.rpm") diff --git a/es-core/CMakeLists.txt b/es-core/CMakeLists.txt index 43260823d..8bb6500ed 100644 --- a/es-core/CMakeLists.txt +++ b/es-core/CMakeLists.txt @@ -9,152 +9,152 @@ project("core") set(CORE_HEADERS - ${CMAKE_CURRENT_SOURCE_DIR}/src/AsyncHandle.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/AudioManager.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/CECInput.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/GuiComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/HelpStyle.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/HttpReq.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/ImageIO.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/InputConfig.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/InputManager.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/Log.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/MameNames.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/Platform.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/ThemeData.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/Window.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/AsyncHandle.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/AudioManager.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/CECInput.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/GuiComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/HelpStyle.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/HttpReq.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/ImageIO.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/InputConfig.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/InputManager.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/Log.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/MameNames.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/Platform.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/ThemeData.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/Window.h - # Animations - ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/Animation.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/AnimationController.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/LambdaAnimation.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/MoveCameraAnimation.h + # Animations + ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/Animation.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/AnimationController.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/LambdaAnimation.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/MoveCameraAnimation.h - # GUI components - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/AnimatedImageComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/BusyComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ButtonComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentGrid.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentList.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeEditComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/GridTileComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/HelpComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/IList.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageGridComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/OptionListComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoFFmpegComponent.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.h + # GUI components + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/AnimatedImageComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/BusyComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ButtonComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentGrid.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentList.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeEditComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/GridTileComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/HelpComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/IList.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageGridComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/OptionListComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoFFmpegComponent.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.h - # GUIs - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditKeyboardPopup.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.h + # GUIs + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditKeyboardPopup.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.h - # Renderers - ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Renderer.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Shader_GL21.h + # Renderers + ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Renderer.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Shader_GL21.h - # Resources - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Font.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureData.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureDataManager.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.h + # Resources + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Font.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureData.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureDataManager.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.h - # Utils - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/CImgUtil.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/FileSystemUtil.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/MathUtil.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/StringUtil.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/TimeUtil.h + # Utils + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/CImgUtil.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/FileSystemUtil.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/MathUtil.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/StringUtil.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/TimeUtil.h ) set(CORE_SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/src/AudioManager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/CECInput.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/GuiComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/HelpStyle.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/HttpReq.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/ImageIO.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/InputConfig.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/InputManager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/Log.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/MameNames.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/Platform.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/Scripting.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/ThemeData.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/Window.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/AudioManager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/CECInput.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/GuiComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/HelpStyle.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/HttpReq.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/ImageIO.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/InputConfig.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/InputManager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/Log.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/MameNames.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/Platform.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/Scripting.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/ThemeData.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/Window.cpp - # Animations - ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/AnimationController.cpp + # Animations + ${CMAKE_CURRENT_SOURCE_DIR}/src/animations/AnimationController.cpp - # GUI components - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/AnimatedImageComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/BusyComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ButtonComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentGrid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentList.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeEditComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/GridTileComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/HelpComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoFFmpegComponent.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.cpp + # GUI components + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/AnimatedImageComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/BusyComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ButtonComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentGrid.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ComponentList.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/DateTimeEditComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/GridTileComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/HelpComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ImageComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/MenuComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/NinePatchComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/RatingComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/ScrollableContainer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SliderComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/SwitchComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoFFmpegComponent.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.cpp - # GUIs - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditKeyboardPopup.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.cpp + # GUIs + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiDetectDevice.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiInputConfig.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiMsgBox.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditKeyboardPopup.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/guis/GuiTextEditPopup.cpp - # Renderer - ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Renderer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Renderer_GL21.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Renderer_GLES10.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Shader_GL21.cpp + # Renderer + ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Renderer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Renderer_GL21.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Renderer_GLES10.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/renderers/Shader_GL21.cpp - # Resources - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Font.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureData.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureDataManager.cpp + # Resources + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Font.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureData.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureDataManager.cpp - # Utils - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/CImgUtil.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/FileSystemUtil.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/MathUtil.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/StringUtil.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/TimeUtil.cpp + # Utils + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/CImgUtil.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/FileSystemUtil.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/MathUtil.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/StringUtil.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/TimeUtil.cpp ) include_directories(${COMMON_INCLUDE_DIRS}) From fad326c3bdc7953afcc02052aca39aa56852015d Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 19:46:59 +0200 Subject: [PATCH 27/64] Miscellaneous code cleanup. --- es-app/src/CollectionSystemsManager.cpp | 1 - es-app/src/FileData.cpp | 6 +++--- es-app/src/SystemData.cpp | 19 ++++++++++--------- es-app/src/SystemData.h | 2 +- es-app/src/SystemScreensaver.cpp | 12 ++++++------ es-app/src/guis/GuiGamelistFilter.cpp | 3 --- es-core/src/components/NinePatchComponent.cpp | 10 +++++----- es-core/src/components/TextListComponent.h | 6 +++++- 8 files changed, 30 insertions(+), 29 deletions(-) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index 54ca1e33a..496c8bb30 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -674,7 +674,6 @@ bool CollectionSystemsManager::toggleGameInCollection(FileData* file) rootFolder->getChildrenByFilename(); bool found = children.find(key) != children.cend(); FileFilterIndex* fileIndex = sysData->getIndex(); - std::string name = sysData->getName(); SystemData* systemViewToUpdate = getSystemToView(sysData); diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index cfc4fe62a..6c977dd0f 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -346,9 +346,9 @@ std::vector FileData::getFilesRecursive(unsigned int typeMask, out.insert(out.cend(), subChildren.cbegin(), subChildren.cend()); } else { - for (auto it = subChildren.cbegin(); it != subChildren.cend(); it++) { - if ((*it)->getCountAsGame()) - out.push_back(*it); + for (auto it2 = subChildren.cbegin(); it2 != subChildren.cend(); it2++) { + if ((*it2)->getCountAsGame()) + out.push_back(*it2); } } } diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 0c10905ee..9c565c0d2 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -392,19 +392,20 @@ bool SystemData::loadConfig() bool onlyProcessCustomFile = false; - for (auto path : configPaths) { + for (auto configPath : configPaths) { // If the loadExclusive tag is present in the custom es_systems.xml file, then skip // processing of the bundled configuration file. if (onlyProcessCustomFile) break; - LOG(LogInfo) << "Parsing systems configuration file \"" << path << "\"..."; + LOG(LogInfo) << "Parsing systems configuration file \"" << configPath << "\"..."; pugi::xml_document doc; #if defined(_WIN64) - pugi::xml_parse_result res = doc.load_file(Utils::String::stringToWideString(path).c_str()); + pugi::xml_parse_result res = + doc.load_file(Utils::String::stringToWideString(configPath).c_str()); #else - pugi::xml_parse_result res = doc.load_file(path.c_str()); + pugi::xml_parse_result res = doc.load_file(configPath.c_str()); #endif if (!res) { @@ -414,7 +415,7 @@ bool SystemData::loadConfig() pugi::xml_node loadExclusive = doc.child("loadExclusive"); if (loadExclusive) { - if (path == configPaths.front() && configPaths.size() > 1) { + if (configPath == configPaths.front() && configPaths.size() > 1) { LOG(LogInfo) << "Only loading custom file as the tag is present"; onlyProcessCustomFile = true; } @@ -1234,21 +1235,21 @@ void SystemData::onMetaDataSavePoint() writeMetaData(); } -void SystemData::setupSystemSortType(FileData* mRootFolder) +void SystemData::setupSystemSortType(FileData* rootFolder) { // If DefaultSortOrder is set to something, check that it is actually a valid value. if (Settings::getInstance()->getString("DefaultSortOrder") != "") { for (unsigned int i = 0; i < FileSorts::SortTypes.size(); i++) { if (FileSorts::SortTypes.at(i).description == Settings::getInstance()->getString("DefaultSortOrder")) { - mRootFolder->setSortTypeString( + rootFolder->setSortTypeString( Settings::getInstance()->getString("DefaultSortOrder")); break; } } } // If no valid sort type was defined in the configuration file, set to default sorting. - if (mRootFolder->getSortTypeString() == "") - mRootFolder->setSortTypeString( + if (rootFolder->getSortTypeString() == "") + rootFolder->setSortTypeString( Settings::getInstance()->getDefaultString("DefaultSortOrder")); } diff --git a/es-app/src/SystemData.h b/es-app/src/SystemData.h index d6bd4de37..381dd4380 100644 --- a/es-app/src/SystemData.h +++ b/es-app/src/SystemData.h @@ -146,7 +146,7 @@ public: void onMetaDataSavePoint(); void writeMetaData(); - void setupSystemSortType(FileData* mRootFolder); + void setupSystemSortType(FileData* rootFolder); private: std::string mName; diff --git a/es-app/src/SystemScreensaver.cpp b/es-app/src/SystemScreensaver.cpp index 8d7fe8c64..846928af1 100644 --- a/es-app/src/SystemScreensaver.cpp +++ b/es-app/src/SystemScreensaver.cpp @@ -440,10 +440,10 @@ void SystemScreensaver::generateImageList() continue; std::vector allFiles = (*it)->getRootFolder()->getFilesRecursive(GAME, true); - for (auto it = allFiles.begin(); it != allFiles.end(); it++) { - std::string imagePath = (*it)->getImagePath(); + for (auto it2 = allFiles.begin(); it2 != allFiles.end(); it2++) { + std::string imagePath = (*it2)->getImagePath(); if (imagePath != "") - mImageFiles.push_back((*it)); + mImageFiles.push_back((*it2)); } } } @@ -457,10 +457,10 @@ void SystemScreensaver::generateVideoList() continue; std::vector allFiles = (*it)->getRootFolder()->getFilesRecursive(GAME, true); - for (auto it = allFiles.begin(); it != allFiles.end(); it++) { - std::string videoPath = (*it)->getVideoPath(); + for (auto it2 = allFiles.begin(); it2 != allFiles.end(); it2++) { + std::string videoPath = (*it2)->getVideoPath(); if (videoPath != "") - mVideoFiles.push_back((*it)); + mVideoFiles.push_back((*it2)); } } } diff --git a/es-app/src/guis/GuiGamelistFilter.cpp b/es-app/src/guis/GuiGamelistFilter.cpp index b861cf179..ee6746ef0 100644 --- a/es-app/src/guis/GuiGamelistFilter.cpp +++ b/es-app/src/guis/GuiGamelistFilter.cpp @@ -147,9 +147,6 @@ void GuiGamelistFilter::addFiltersToMenu() std::string menuLabel = (*it).menuLabel; // Text to show in menu. std::shared_ptr> optionList; - // Add filters (with first one selected). - ComponentListRow row; - // Add genres. optionList = std::make_shared>(mWindow, getHelpStyle(), menuLabel, true); diff --git a/es-core/src/components/NinePatchComponent.cpp b/es-core/src/components/NinePatchComponent.cpp index d8a6b6716..d908499fd 100644 --- a/es-core/src/components/NinePatchComponent.cpp +++ b/es-core/src/components/NinePatchComponent.cpp @@ -95,13 +95,13 @@ void NinePatchComponent::buildVertices() const glm::vec2 imgPos{imgPosX[sliceX], imgPosY[sliceY]}; const glm::vec2 imgSize{imgSizeX[sliceX], imgSizeY[sliceY]}; const glm::vec2 texPos{texPosX[sliceX], texPosY[sliceY]}; - const glm::vec2 texSize{texSizeX[sliceX], texSizeY[sliceY]}; + const glm::vec2 texSizeSlice{texSizeX[sliceX], texSizeY[sliceY]}; // clang-format off - mVertices[v + 1] = {{imgPos.x , imgPos.y }, {texPos.x, texPos.y }, 0}; - mVertices[v + 2] = {{imgPos.x , imgPos.y + imgSize.y}, {texPos.x, texPos.y + texSize.y}, 0}; - mVertices[v + 3] = {{imgPos.x + imgSize.x, imgPos.y }, {texPos.x + texSize.x, texPos.y }, 0}; - mVertices[v + 4] = {{imgPos.x + imgSize.x, imgPos.y + imgSize.y}, {texPos.x + texSize.x, texPos.y + texSize.y}, 0}; + mVertices[v + 1] = {{imgPos.x , imgPos.y }, {texPos.x, texPos.y }, 0}; + mVertices[v + 2] = {{imgPos.x , imgPos.y + imgSize.y}, {texPos.x, texPos.y + texSizeSlice.y}, 0}; + mVertices[v + 3] = {{imgPos.x + imgSize.x, imgPos.y }, {texPos.x + texSizeSlice.x, texPos.y }, 0}; + mVertices[v + 4] = {{imgPos.x + imgSize.x, imgPos.y + imgSize.y}, {texPos.x + texSizeSlice.x, texPos.y + texSizeSlice.y}, 0}; // clang-format on // Round vertices. diff --git a/es-core/src/components/TextListComponent.h b/es-core/src/components/TextListComponent.h index b33ec6bd9..1af73a9e5 100644 --- a/es-core/src/components/TextListComponent.h +++ b/es-core/src/components/TextListComponent.h @@ -62,7 +62,11 @@ public: ALIGN_RIGHT }; - void setAlignment(Alignment align) { mAlignment = align; } + void setAlignment(Alignment align) + { + // Set alignment. + mAlignment = align; + } void setCursorChangedCallback(const std::function& func) { From 79849188d1d209dc1c80bd0b6700ad21f02d4c22 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 20:43:36 +0200 Subject: [PATCH 28/64] Fixed an issue where animations would play incorrectly when disabling a collection. --- es-app/src/guis/GuiSettings.cpp | 6 +++--- es-app/src/main.cpp | 4 ++-- es-app/src/views/ViewController.cpp | 6 ++++-- es-app/src/views/ViewController.h | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/es-app/src/guis/GuiSettings.cpp b/es-app/src/guis/GuiSettings.cpp index 53cc3e2f9..6cd181dc8 100644 --- a/es-app/src/guis/GuiSettings.cpp +++ b/es-app/src/guis/GuiSettings.cpp @@ -97,7 +97,7 @@ void GuiSettings::save() ViewController::get()->reloadAll(); if (mNeedsGoToStart) - ViewController::get()->goToStart(); + ViewController::get()->goToStart(true); if (mNeedsGoToSystem) ViewController::get()->goToSystem(mGoToSystem, false); @@ -124,7 +124,7 @@ void GuiSettings::save() // the safe side. if (state.getSystem()->isCollection() && state.getSystem()->getThemeFolder() != "custom-collections") { - ViewController::get()->goToStart(); + ViewController::get()->goToStart(false); ViewController::get()->goToSystem(SystemData::sSystemVector.front(), false); // We don't want to invalidate the cached background when there has been a collection // systen change as that may show a black screen in some circumstances. @@ -134,7 +134,7 @@ void GuiSettings::save() // system view). if (std::find(SystemData::sSystemVector.begin(), SystemData::sSystemVector.end(), state.getSystem()) == SystemData::sSystemVector.end()) { - ViewController::get()->goToStart(); + ViewController::get()->goToStart(false); return; } } diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index 86e9bf385..46f9d9cea 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -636,10 +636,10 @@ int main(int argc, char* argv[]) if (!loadSystemsStatus) { if (forceInputConfig) { window.pushGui(new GuiDetectDevice(&window, false, true, - [] { ViewController::get()->goToStart(); })); + [] { ViewController::get()->goToStart(true); })); } else { - ViewController::get()->goToStart(); + ViewController::get()->goToStart(true); } } diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 8bcc689ea..4add03ba4 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -236,7 +236,7 @@ void ViewController::invalidAlternativeEmulatorDialog() "INTERFACE IN THE 'OTHER SETTINGS' MENU")); } -void ViewController::goToStart() +void ViewController::goToStart(bool playTransition) { // If the system view does not exist, then create it. We do this here as it would // otherwise not be done if jumping directly into a specific game system on startup. @@ -250,6 +250,8 @@ void ViewController::goToStart() it != SystemData::sSystemVector.cend(); it++) { if ((*it)->getName() == requestedSystem) { goToGameList(*it); + if (!playTransition) + cancelViewTransitions(); return; } } @@ -624,7 +626,7 @@ void ViewController::playViewTransition(bool instant) fadeCallback, true); }); - // Fast-forward animation if we're partway faded. + // Fast-forward animation if we're partially faded. if (target == static_cast(-mCamera[3])) { // Not changing screens, so cancel the first half entirely. advanceAnimation(0, FADE_DURATION); diff --git a/es-app/src/views/ViewController.h b/es-app/src/views/ViewController.h index 69713ef12..38c0560a0 100644 --- a/es-app/src/views/ViewController.h +++ b/es-app/src/views/ViewController.h @@ -60,7 +60,7 @@ public: void goToGameList(SystemData* system); void goToSystemView(SystemData* system, bool playTransition); void goToSystem(SystemData* system, bool animate); - void goToStart(); + void goToStart(bool playTransition); void ReloadAndGoToStart(); // Functions to make the GUI behave properly. From 00e304f09a435396c5c3badced68e74a7f888a4d Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 23:07:04 +0200 Subject: [PATCH 29/64] Fixed an issue where navigation in menus would behave weirdly under some circumstances. --- es-core/src/components/ComponentList.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/es-core/src/components/ComponentList.cpp b/es-core/src/components/ComponentList.cpp index 17cd6e8c7..db6e65fff 100644 --- a/es-core/src/components/ComponentList.cpp +++ b/es-core/src/components/ComponentList.cpp @@ -61,6 +61,12 @@ bool ComponentList::input(InputConfig* config, Input input) if (size() == 0) return false; + if (input.value && + (config->isMappedTo("a", input) || config->isMappedLike("lefttrigger", input) || + config->isMappedLike("righttrigger", input))) { + stopScrolling(); + } + // Give it to the current row's input handler. if (mEntries.at(mCursor).data.input_handler) { if (mEntries.at(mCursor).data.input_handler(config, input)) From 372a92baa5fbb61a6658fb7e30e97e131fd4ea98 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 23:08:12 +0200 Subject: [PATCH 30/64] The navigation key repeat now stops when selecting a key on the virtual keyboard. --- es-core/src/guis/GuiTextEditKeyboardPopup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp index b6017eed1..5699bf550 100644 --- a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp @@ -337,6 +337,12 @@ bool GuiTextEditKeyboardPopup::input(InputConfig* config, Input input) return true; } + // Pressing a key stops the navigation repeat, i.e. the cursor stops at the selected key. + if (config->isMappedTo("a", input) && input.value && !mText->isEditing()) { + mNavigationRepeatDirX = 0; + mNavigationRepeatDirY = 0; + } + // If the keyboard has been configured with backspace as the back button (which is the default // configuration) then ignore this key if we're currently editing or otherwise it would be // impossible to erase characters using this key. From 6b7ea8f0effa73fc0261f3360a0ef291070a78a8 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 23:14:31 +0200 Subject: [PATCH 31/64] Documentation update. --- CHANGELOG.md | 7 ++++++- INSTALL-DEV.md | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bb7b09a4..cc931c549 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,13 +31,18 @@ * 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 -* Changed two clang-format rules related to braced lists and reformatted the codebase +* Increased the warning level for LLVM/Clang 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 +* Increased the minimal required compiler version to 5.0.0 for LLVM/Clang and 7.1 for GCC +* Changed two clang-format rules related to braced lists and reformatted the codebase ### Bug fixes * When navigating menus, the separator lines and menu components did not align properly and moved up and down slightly +* When scrolling in menus, pressing other buttons than "Up" or "Down" did not stop the scrolling which caused all sorts of weird behavior * With the menu scale-up effect enabled and entering a submenu before the parent menu was completely scaled up, the parent would get stuck at a semi-scaled size +* Disabling a collection while its gamelist was displayed would lead to a slide transition from a black screen if a gamelist on startup had been set * Horizontal sizing of the TextComponent input field was not consistent across different screen resolutions * The "sortname" window header was incorrectly spelled when editing this type of entry in the metadata editor * When the last row of a menu had its text color changed, this color was completely desaturated when navigating to a button below the list diff --git a/INSTALL-DEV.md b/INSTALL-DEV.md index cb18ceb84..d7963cb34 100644 --- a/INSTALL-DEV.md +++ b/INSTALL-DEV.md @@ -125,7 +125,7 @@ pkg_add vlc In the same manner as for FreeBSD, Clang/LLVM and cURL should already be installed by default. -RapidJSON is not part of the OpenBSD ports/package collection as of v6.8, so you need to compile it yourself. At the time of writing, the latest release v1.1.0 does not compile on OpenBSD, so you need to use the master branch: +RapidJSON is not part of the OpenBSD ports/package collection as of v6.8, so you need to compile it yourself. At the time of writing, the latest release v1.1.0 does not compile on OpenBSD, so you need to use the latest available code from the master branch: ``` git clone https://github.com/Tencent/rapidjson.git @@ -872,12 +872,12 @@ make [RapidJSON](http://rapidjson.org) -For RapidJSON you don't need to compile, you just need the include files: +For RapidJSON you don't need to compile anything, you just need the include files. + +At the time of writing, the latest release v1.1.0 generates some compiler warnings on Windows, but this can be avoided by using the latest available code from the master branch: ``` git clone git://github.com/Tencent/rapidjson.git -cd rapidjson -git checkout v1.1.0 ``` From d1ffdfca3559a55a4963e68c26dac7d2986f22a1 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 17:19:56 +0200 Subject: [PATCH 32/64] Removed an unused preprocessor directive. --- es-core/src/guis/GuiTextEditKeyboardPopup.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp index 5699bf550..b3f46a3d3 100644 --- a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp @@ -7,7 +7,6 @@ // Has a default mode and a complex mode, both with various options passed as arguments. // -#define KEYBOARD_WIDTH Renderer::getScreenWidth() * 0.78f #define KEYBOARD_HEIGHT Renderer::getScreenHeight() * 0.60f #define KEYBOARD_PADDINGX (Renderer::getScreenWidth() * 0.02f) From 5851139e534d9742d42a09df70e66394e398f6a7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 17:20:58 +0200 Subject: [PATCH 33/64] Added the -Wunused-macros compiler flag. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68fc3a983..1c8ff03b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,7 +139,7 @@ if(CMAKE_BUILD_TYPE MATCHES Debug) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /Od /DEBUG:FULL") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O0 -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O0 -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers -Wunused-macros") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O0") endif() # If using Clang, then add additional debug data needed by GDB. @@ -154,7 +154,7 @@ elseif(CMAKE_BUILD_TYPE MATCHES Profiling) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /O2 /DEBUG:FULL") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -pg -g -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -pg -g -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers -Wunused-macros") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2 -pg") endif() else() @@ -163,7 +163,7 @@ else() if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG /std:c++17 /O2 /DEBUG:NONE") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -DNDEBUG -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -DNDEBUG -Wall -Wpedantic -Wsign-compare -Wnarrowing -Wmissing-field-initializers -Wunused-macros") if(APPLE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2") else() From e08d3c6c1d552e14427214ef201333c644af2b6b Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 17:22:32 +0200 Subject: [PATCH 34/64] Fixed an issue where a collection notification was not displayed when setting a game to not be counted. --- es-app/src/CollectionSystemsManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index 496c8bb30..f9dfaeaf9 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -385,6 +385,14 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection parentRootFolder->sort(parentRootFolder->getSortTypeFromString( parentRootFolder->getSortTypeString()), mFavoritesSorting); + GuiInfoPopup* s = new GuiInfoPopup( + mWindow, + "DISABLED '" + + Utils::String::toUpper( + Utils::String::removeParenthesis(file->getName())) + + "' IN '" + Utils::String::toUpper(sysData.system->getName()) + "'", + 4000); + mWindow->setInfoPopup(s); } else { ViewController::get()->getGameListView(curSys).get()->remove(collectionEntry, From 5199f0cc0276efe136d95ee6f38525d16d5d3fc4 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 19:59:09 +0200 Subject: [PATCH 35/64] Invalid entry values are now displayed for the alternative emulators field in the metadata editor. Also made the 'clear entry' fields look nicer in the metadata editor and the alternative emulators GUI. --- es-app/src/guis/GuiAlternativeEmulators.cpp | 7 +++--- es-app/src/guis/GuiMetaDataEd.cpp | 26 ++++++++++++++------- es-app/src/views/ViewController.cpp | 2 ++ es-app/src/views/ViewController.h | 1 + 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/es-app/src/guis/GuiAlternativeEmulators.cpp b/es-app/src/guis/GuiAlternativeEmulators.cpp index 3b36d1972..2ae241799 100644 --- a/es-app/src/guis/GuiAlternativeEmulators.cpp +++ b/es-app/src/guis/GuiAlternativeEmulators.cpp @@ -95,7 +95,7 @@ GuiAlternativeEmulators::GuiAlternativeEmulators(Window* window) row.addElement(labelText, false); row.makeAcceptInputHandler([this, it, labelText] { - if (labelText->getValue() == "") + if (labelText->getValue() == ViewController::CROSSEDCIRCLE_CHAR + " CLEARED ENTRY") return; selectorWindow(*it); }); @@ -154,7 +154,7 @@ void GuiAlternativeEmulators::selectorWindow(SystemData* system) ComponentListRow row; if (entry.second == "") - label = ""; + label = ViewController::CROSSEDCIRCLE_CHAR + " CLEAR INVALID ENTRY"; else label = entry.second; @@ -175,7 +175,8 @@ void GuiAlternativeEmulators::selectorWindow(SystemData* system) if (entry.second == system->getSystemEnvData()->mLaunchCommands.front().second) { if (system->getSystemEnvData()->mLaunchCommands.front().second == "") { - updateMenu(system->getName(), "", + updateMenu(system->getName(), + ViewController::CROSSEDCIRCLE_CHAR + " CLEARED ENTRY", (entry.second == system->getSystemEnvData()->mLaunchCommands.front().second)); } diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index cf53d98ed..1c73698ab 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -217,20 +217,30 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, if (mInvalidEmulatorEntry || scraperParams.system->getSystemEnvData()->mLaunchCommands.size() > 1) { - row.makeAcceptInputHandler([this, title, scraperParams, ed, updateVal] { - auto s = new GuiSettings(mWindow, title); + row.makeAcceptInputHandler([this, title, scraperParams, ed, updateVal, + originalValue] { + GuiSettings* s = nullptr; - if (!mInvalidEmulatorEntry && ed->getValue() == "" && - scraperParams.system->getSystemEnvData()->mLaunchCommands.size() == 1) + bool singleEntry = + scraperParams.system->getSystemEnvData()->mLaunchCommands.size() == 1; + + if (mInvalidEmulatorEntry && singleEntry) + s = new GuiSettings(mWindow, "CLEAR INVALID ENTRY"); + else + s = new GuiSettings(mWindow, title); + + if (!mInvalidEmulatorEntry && ed->getValue() == "" && singleEntry) return; std::vector> launchCommands = scraperParams.system->getSystemEnvData()->mLaunchCommands; - if (ed->getValue() != "" && mInvalidEmulatorEntry) - launchCommands.push_back(std::make_pair("", "")); + if (ed->getValue() != "" && mInvalidEmulatorEntry && singleEntry) + launchCommands.push_back(std::make_pair( + "", ViewController::EXCLAMATION_CHAR + " " + originalValue)); else if (ed->getValue() != "") - launchCommands.push_back(std::make_pair("", "")); + launchCommands.push_back(std::make_pair( + "", ViewController::CROSSEDCIRCLE_CHAR + " CLEAR ENTRY")); for (auto entry : launchCommands) { std::string selectedLabel = ed->getValue(); @@ -385,7 +395,7 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, mList->addRow(row); if (iter->type == MD_ALT_EMULATOR && mInvalidEmulatorEntry == true) - ed->setValue(ViewController::EXCLAMATION_CHAR + " INVALID ENTRY "); + ed->setValue(ViewController::EXCLAMATION_CHAR + " " + originalValue); else ed->setValue(mMetaData->get(iter->key)); diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 4add03ba4..74977005a 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -39,6 +39,7 @@ ViewController* ViewController::sInstance = nullptr; #if defined(_MSC_VER) // MSVC compiler. const std::string ViewController::CONTROLLER_CHAR = Utils::String::wideStringToString(L"\uf11b"); +const std::string ViewController::CROSSEDCIRCLE_CHAR = Utils::String::wideStringToString(L"\uf05e"); const std::string ViewController::EXCLAMATION_CHAR = Utils::String::wideStringToString(L"\uf06a"); const std::string ViewController::FAVORITE_CHAR = Utils::String::wideStringToString(L"\uf005"); const std::string ViewController::FILTER_CHAR = Utils::String::wideStringToString(L"\uf0b0"); @@ -47,6 +48,7 @@ const std::string ViewController::GEAR_CHAR = Utils::String::wideStringToString( const std::string ViewController::TICKMARK_CHAR = Utils::String::wideStringToString(L"\uf14A"); #else const std::string ViewController::CONTROLLER_CHAR = "\uf11b"; +const std::string ViewController::CROSSEDCIRCLE_CHAR = "\uf05e"; const std::string ViewController::EXCLAMATION_CHAR = "\uf06a"; const std::string ViewController::FAVORITE_CHAR = "\uf005"; const std::string ViewController::FILTER_CHAR = "\uf0b0"; diff --git a/es-app/src/views/ViewController.h b/es-app/src/views/ViewController.h index 38c0560a0..a3898e377 100644 --- a/es-app/src/views/ViewController.h +++ b/es-app/src/views/ViewController.h @@ -124,6 +124,7 @@ public: // Font Awesome symbols. static const std::string CONTROLLER_CHAR; + static const std::string CROSSEDCIRCLE_CHAR; static const std::string EXCLAMATION_CHAR; static const std::string FAVORITE_CHAR; static const std::string FILTER_CHAR; From 49075f3fc4e3becaa7fa2b262c25ae0640483aee Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 20:04:58 +0200 Subject: [PATCH 36/64] Added alternative emulators to the psx (Sony PlayStation) system. --- resources/systems/macos/es_systems.xml | 7 +++++-- resources/systems/unix/es_systems.xml | 7 +++++-- resources/systems/windows/es_systems.xml | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index f5d76da42..c25afa153 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -885,8 +885,11 @@ psx Sony PlayStation %ROMPATH%/psx - .cue .CUE .toc .TOC .m3u .M3U .ccd .CCD .exe .EXE .pbp .PBP .chd .CHD .cbn .CBN .img .IMG .iso .ISO .mdf .MDF .z .Z .znx .ZNX .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_libretro.dylib %ROM% + .bin .BIN .cbn .CBN .ccd .CCD .chd .CHD .cue .CUE .ecm .ECM .exe .EXE .img .IMG .iso .ISO .m3u .M3U .mdf .MDF .mds .MDS .pbp .PBP .psexe .PSEXE .psf .PSF .toc .TOC .z .Z .znx .ZNX .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_hw_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/pcsx_rearmed_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/duckstation_libretro.dylib %ROM% psx psx diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index fcca1792b..b284cd492 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -887,8 +887,11 @@ psx Sony PlayStation %ROMPATH%/psx - .cue .CUE .toc .TOC .m3u .M3U .ccd .CCD .exe .EXE .pbp .PBP .chd .CHD .cbn .CBN .img .IMG .iso .ISO .mdf .MDF .z .Z .znx .ZNX .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_libretro.so %ROM% + .bin .BIN .cbn .CBN .ccd .CCD .chd .CHD .cue .CUE .ecm .ECM .exe .EXE .img .IMG .iso .ISO .m3u .M3U .mdf .MDF .mds .MDS .pbp .PBP .psexe .PSEXE .psf .PSF .toc .TOC .z .Z .znx .ZNX .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_hw_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/pcsx_rearmed_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/duckstation_libretro.so %ROM% psx psx diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index ef0dffc31..1b08cfa92 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -887,8 +887,11 @@ psx Sony PlayStation %ROMPATH%\psx - .cue .CUE .toc .TOC .m3u .M3U .ccd .CCD .exe .EXE .pbp .PBP .chd .CHD .cbn .CBN .img .IMG .iso .ISO .mdf .MDF .z .Z .znx .ZNX .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_psx_libretro.dll %ROM% + .bin .BIN .cbn .CBN .ccd .CCD .chd .CHD .cue .CUE .ecm .ECM .exe .EXE .img .IMG .iso .ISO .m3u .M3U .mdf .MDF .mds .MDS .pbp .PBP .psexe .PSEXE .psf .PSF .toc .TOC .z .Z .znx .ZNX .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_psx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_psx_hw_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\pcsx_rearmed_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\duckstation_libretro.dll %ROM% psx psx From 8f82809a89149ba0cda8394124bf552fe5bf18f3 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 22:08:27 +0200 Subject: [PATCH 37/64] Leading and trailing whitespaces are now trimmed from refined scraper searches. --- es-app/src/guis/GuiScraperSearch.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index 93ff9f680..93d70ffa2 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -777,7 +777,16 @@ void GuiScraperSearch::updateThumbnail() void GuiScraperSearch::openInputScreen(ScraperSearchParams& params) { - auto searchForFunc = [&](const std::string& name) { + 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()); + stop(); mRefinedSearch = true; params.nameOverride = name; From e507335923c29be88ba87bf5317e49078aa23635 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 22:10:09 +0200 Subject: [PATCH 38/64] Leading and trailing whitespaces are now trimmed from TheGamesDB scraper searches. --- es-app/src/scrapers/GamesDBJSONScraper.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/es-app/src/scrapers/GamesDBJSONScraper.cpp b/es-app/src/scrapers/GamesDBJSONScraper.cpp index b35f1a2c3..4c015d38c 100644 --- a/es-app/src/scrapers/GamesDBJSONScraper.cpp +++ b/es-app/src/scrapers/GamesDBJSONScraper.cpp @@ -158,6 +158,18 @@ void thegamesdb_generate_json_scraper_requests( cleanName = params.game->getCleanName(); } } + + // 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()); + path += "/Games/ByGameName?" + apiKey + "&fields=players,publishers,genres,overview,last_updated,rating," "platform,coop,youtube,os,processor,ram,hdd,video,sound,alternates&name=" + From 527b9321b51fd9ac71d80b0c35819b744bfbd684 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 22:15:42 +0200 Subject: [PATCH 39/64] Leading and trailing whitespaces are now trimmed when requesting a new custom collection name. --- es-app/src/CollectionSystemsManager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index f9dfaeaf9..282b880a2 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -554,6 +554,15 @@ 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()); + if (index == 0) { size_t remove = std::string::npos; // Get valid name. From fc08a83fa0fd6135c13d4ee6c43fc4dc7880af47 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 22:18:18 +0200 Subject: [PATCH 40/64] TextEditComponent will now return an empty string if only whitespace characters were entered. --- es-core/src/components/TextEditComponent.cpp | 16 ++++++++++++++++ es-core/src/components/TextEditComponent.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/es-core/src/components/TextEditComponent.cpp b/es-core/src/components/TextEditComponent.cpp index a71df9cca..e333a96d0 100644 --- a/es-core/src/components/TextEditComponent.cpp +++ b/es-core/src/components/TextEditComponent.cpp @@ -84,6 +84,22 @@ void TextEditComponent::textInput(const std::string& text) onCursorChanged(); } +std::string TextEditComponent::getValue() const +{ + if (mText.empty()) + return ""; + + // If mText only contains whitespace characters, then return an empty string. + if (std::find_if(mText.cbegin(), mText.cend(), [](char c) { + return !std::isspace(static_cast(c)); + }) == mText.cend()) { + return ""; + } + else { + return mText; + } +} + void TextEditComponent::startEditing() { SDL_StartTextInput(); diff --git a/es-core/src/components/TextEditComponent.h b/es-core/src/components/TextEditComponent.h index 302c832f7..4967880c8 100644 --- a/es-core/src/components/TextEditComponent.h +++ b/es-core/src/components/TextEditComponent.h @@ -33,7 +33,7 @@ public: void onSizeChanged() override; void setValue(const std::string& val) override; - std::string getValue() const override { return mText; } + std::string getValue() const override; void startEditing(); void stopEditing(); From 268a038ef08d0fc242cefb89bb46c9342242b5ce Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 22:46:59 +0200 Subject: [PATCH 41/64] Documentation update. --- CHANGELOG.md | 8 ++++++-- USERGUIDE-DEV.md | 36 ++++++++++++++++++++---------------- USERGUIDE.md | 24 ++++++++++++------------ 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc931c549..7a7a848ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,18 +31,22 @@ * 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 -* Increased the warning level for LLVM/Clang and GCC by adding -Wall, -Wpedantic and some additional flags +* 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 -* Increased the minimal required compiler version to 5.0.0 for LLVM/Clang and 7.1 for GCC +* Increased the minimal required compiler version to 5.0.0 for Clang/LLVM and 7.1 for GCC * Changed two clang-format rules related to braced lists and reformatted the codebase ### Bug fixes +* Input consisting of only whitespace characters would get accepted by TextEditComponent which led to various strange behaviours +* 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 * When navigating menus, the separator lines and menu components did not align properly and moved up and down slightly * When scrolling in menus, pressing other buttons than "Up" or "Down" did not stop the scrolling which caused all sorts of weird behavior * With the menu scale-up effect enabled and entering a submenu before the parent menu was completely scaled up, the parent would get stuck at a semi-scaled size * Disabling a collection while its gamelist was displayed would lead to a slide transition from a black screen if a gamelist on startup had been set +* When marking a game to not be counted in the metadata editor and the game was part of a custom collection, no collection disabling notification was displayed * Horizontal sizing of the TextComponent input field was not consistent across different screen resolutions * The "sortname" window header was incorrectly spelled when editing this type of entry in the metadata editor * When the last row of a menu had its text color changed, this color was completely desaturated when navigating to a button below the list diff --git a/USERGUIDE-DEV.md b/USERGUIDE-DEV.md index 122b7fec9..99575a382 100644 --- a/USERGUIDE-DEV.md +++ b/USERGUIDE-DEV.md @@ -377,7 +377,7 @@ The platform name for the Commodore 64 is `c64`, so the following structure woul ~/ROMs/c64/Multidisk/Pirates/Pirates!.m3u ``` -It's highly recommended to create `.m3u` playlist files for multi-disk images as this normally automates disk swapping in the emulator. It's then this .m3u file that should be selected for launching the game. +It's highly recommended to create `.m3u` playlist files for multi-disc images as this normally automates disk swapping in the emulator. It's then this .m3u file that should be selected for launching the game. The .m3u file simply contains a list of the game files, for example in the case of Last Ninja 2.m3u: @@ -432,7 +432,7 @@ Apart from the potential difficulty in locating the emulator binary, there are s There are multiple ways to run Amiga games, but the recommended approach is to use WHDLoad. The best way is to use hard disk images in `.hdf` or `.hdz` format, meaning there will be a single file per game. This makes it just as easy to play Amiga games as any console with game ROMs. -An alternative would be to use `.adf` images as not all games may be available with WHDLoad support. For this, you can either put single-disk images in the root folder or in a dedicated adf directory, or multiple-disk games in separate folders. It's highly recommended to create `.m3u` playlist files for multi-disk images as described earlier. +An alternative would be to use `.adf` images as not all games may be available with WHDLoad support. For this, you can either put single-disc images in the root folder or in a dedicated adf directory, or multiple-disk games in separate folders. It's highly recommended to create `.m3u` playlist files for multi-disc images as described earlier. Here's an example of what the file structure could look like: @@ -872,7 +872,7 @@ If this setting is enabled and a folder has its flag set to be excluded from the **Scrape actual folders** _(Multi-scraper only)_ -Enabling this option causes folders themselves to be included by the scraper. This is useful for DOS games or any multi-disk games where there is a folder for each individual game. +Enabling this option causes folders themselves to be included by the scraper. This is useful for DOS games or any multi-disc games where there is a folder for each individual game. **Auto-retry on peer verification errors** _(ScreenScraper only)_ @@ -956,7 +956,7 @@ With this option enabled, there will be an overlay displayed when scrolling the **Enable virtual keyboard** -This enables a virtual (on-screen) keyboard that can be used at various places throughout the application to input text and numbers using a controller. The Shift and Alt keys can be toggled individually or combined together to access many special characters. The general use of the virtual keyboard should hopefully be self-explanatory, +This enables a virtual (on-screen) keyboard that can be used at various places throughout the application to input text and numbers using a controller. The Shift and Alt keys can be toggled individually or combined together to access many special characters. The general use of the virtual keyboard should hopefully be self-explanatory. **Enable toggle favorites button** @@ -1242,7 +1242,7 @@ If this option is disabled, hidden files and folders within the ROMs directory t **Show hidden games (requires restart)** -You can mark games as hidden in the metadata editor, which is useful for instance for DOS games where you may not want to see some batch files and executables inside ES-DE, or for multi-disk games where you may only want to show the .m3u playlists and not the individual game files. By disabling this option these files will not be processed at all when ES-DE starts up. If you enable the option you will see the files, but their name entries will be almost transparent in the gamelist view to visually indicate that they are hidden. +You can mark games as hidden in the metadata editor, which is useful for instance for DOS games where you may not want to see some batch files and executables inside ES-DE, or for multi-disc games where you may only want to show the .m3u playlists and not the individual game files. By disabling this option these files will not be processed at all when ES-DE starts up. If you enable the option you will see the files, but their name entries will be almost transparent in the gamelist view to visually indicate that they are hidden. **Enable custom event scripts** @@ -1430,7 +1430,7 @@ A flag to mark whether the game is suitable for children. This will be applied a **Hidden** -A flag to indicate that the game is hidden. If the corresponding option has been set in the main menu, the game will not be shown. Useful for example for DOS games to hide batch scripts and unnecessary binaries or to hide the actual game files for multi-disk games. If a file or folder is flagged as hidden but the corresponding option to hide hidden games has not been enabled, then the opacity of the text will be lowered significantly to make it clear that it's a hidden entry. +A flag to indicate that the game is hidden. If the corresponding option has been set in the main menu, the game will not be shown. Useful for example for DOS games to hide batch scripts and unnecessary binaries or to hide the actual game files for multi-disc games. If a file or folder is flagged as hidden but the corresponding option to hide hidden games has not been enabled, then the opacity of the text will be lowered significantly to make it clear that it's a hidden entry. **Broken/not working** @@ -1438,15 +1438,15 @@ A flag to indicate whether the game is broken. Useful for MAME games for instanc **Exclude from game counter** _(files only)_ -A flag to indicate whether the game should be excluded from being counted. If this is set for a game, it will not be included in the game counter shown per system on the system view, and it will not be included in the system information field in the gamelist view. As well, it will be excluded from all automatic and custom collections. This option is quite useful for multi-file games such as multi-disk Amiga or Commodore 64 games, or for DOS games where you want to exclude setup programs and similar but still need them available in ES-DE and therefore can't hide them. Files that have this flag set will have a lower opacity in the gamelists, making them easy to spot. +A flag to indicate whether the game should be excluded from being counted. If this is set for a game, it will not be included in the game counter shown per system on the system view, and it will not be included in the system information field in the gamelist view. As well, it will be excluded from all automatic and custom collections. This option is quite useful for multi-file games such as multi-disc Amiga or Commodore 64 games, or for DOS games where you want to exclude setup programs and similar but still need them available in ES-DE and therefore can't hide them. Files that have this flag set will have a lower opacity in the gamelists, making them easy to spot. **Exclude from multi-scraper** -Whether to exclude the file from the multi-scraper. This is quite useful in order to avoid scraping all the disks for multi-disk games for example. There is an option in the scraper settings to ignore this flag, but by default the multi-scraper will respect it. +Whether to exclude the file from the multi-scraper. This is quite useful in order to avoid scraping all the disks for multi-disc games for example. There is an option in the scraper settings to ignore this flag, but by default the multi-scraper will respect it. **Hide metadata fields** -This option will hide most metadata fields in the gamelist view. The intention is to be able to hide the fields for situations such as general folders (Multi-disk, Cartridges etc.) and for setup programs and similar (e.g. SETUP.EXE or INSTALL.BAT for DOS games). It could also be used on the game files for multi-disk games where perhaps only the .m3u playlist should have any metadata values. The only fields shown with this option enabled are the game name and description. Using the description it's possible to write some comments regarding the file or folder, should you want to. It's also possible to display game images and videos with this setting enabled. +This option will hide most metadata fields in the gamelist view. The intention is to be able to hide the fields for situations such as general folders (Multi-disc, Cartridges etc.) and for setup programs and similar (e.g. SETUP.EXE or INSTALL.BAT for DOS games). It could also be used on the game files for multi-disc games where perhaps only the .m3u playlist should have any metadata values. The only fields shown with this option enabled are the game name and description. Using the description it's possible to write some comments regarding the file or folder, should you want to. It's also possible to display game images and videos with this setting enabled. **Times played** _(files only)_ @@ -1644,18 +1644,22 @@ Sometimes the name of the console is (more or less) the same for multiple region For the **Full name** column, text inside square brackets [] are comments and not part of the actual game system name. -The **Default emulator** column lists the primary emulator as configured in es_systems.xml. Any system marked with an asterisk (*) in this column requires additional system/BIOS ROMs to run, as should be explained in the emulator documentation. +The **Default emulator** column lists the primary emulator as configured in es_systems.xml. Any system marked with an asterisk (*) in this column requires additional system/BIOS ROMs to run, as should be explained by the emulator documentation. Good starting points for such documentation are [https://docs.libretro.com](https://docs.libretro.com) and [https://docs.libretro.com/library/bios](https://docs.libretro.com/library/bios) The **Alternative emulators** column lists additional emulators configured in es_systems.xml that can be selected per system and per game, as explained earlier in this guide. Note that not all of these emulators may be available on all operating systems. -For additional details regarding which game file extensions are supported per system, refer to the es_systems.xml files [unix/es_systems.xml](resources/systems/unix/es_systems.xml), [macos/es_systems.xml](resources/systems/macos/es_systems.xml) and [windows/es_systems.xml](resources/systems/windows/es_systems.xml). Normally the extensions setup in these files should cover everything that the emulators support. +For additional details regarding which game file extensions are supported per system, refer to the es_systems.xml files [unix/es_systems.xml](resources/systems/unix/es_systems.xml), [macos/es_systems.xml](resources/systems/macos/es_systems.xml) and [windows/es_systems.xml](resources/systems/windows/es_systems.xml). Normally the extensions setup in these files should cover everything that the emulators support. Note that for systems that have alternative emulators defined, the list of extensions is a combination of what is supported by all the emulators. This approach is necessary as you want to be able to see all games for each system while potentially testing and switching between different emulators, either system-wide or on a per game basis. If you generated the ROMs directory structure when first starting ES-DE, the systeminfo.txt files located in each game system directory will also contain the information about the emulator core and supported file extensions. +For CD-based systems it's generally recommended to use CHD files (extension .chd) as this saves space due to compression compared to BIN/CUE, IMG, ISO etc. The CHD format is also supported by most emulators. You can convert to CHD from various formats using the MAME `chdman` utility, for example `chdman createcd -i mygame.iso -o mygame.chd`. Sometimes chdman has issues converting from the IMG and BIN formats, and in this case it's possible to first convert to ISO using `ccd2iso`, such as `ccd2iso mygame.img mygame.iso`. + MAME emulation is a bit special as the choice of emulator depends on which ROM set you're using. It's recommended to go for the latest available set, as MAME is constantly improved with more complete and accurate emulation. Therefore the `arcade` system is configured to use _MAME - Current (RetroArch)_ by default, which as the name implies will be the latest available MAME version. But if you have a really slow computer you may want to use another ROM set such as the popular 0.78. In this case, you can either select _MAME 2003-Plus (RetroArch)_ as an alternative emulator, or you can use the `mame` system which comes configured with this emulator as the default. There are more MAME versions available as alternative emulators, as you can see in the table below. There are also other MAME forks and derivates available such as MAME4ALL, AdvanceMAME, FinalBurn Alpha and FinalBurn Neo but it's beyond the scope of this document to describe those in detail. For more information, refer to the [RetroPie arcade documentation](https://retropie.org.uk/docs/Arcade) which has a good overview of the various MAME alternatives. +In general .zip or .7z files are recommended for smaller-sized games like those from older systems (assuming the emulator supports it). But for CD-based systems it's not a good approach as uncompressing the larger CD images takes quite some time, leading to slow game launches. As explained above, converting CD images to CHD files is a better solution for achieving file compression while still enjoying fast game launches. + Consider the table below a work in progress as it's obvioulsy not fully populated yet! | Game system name | Full name | Default emulator | Alternative emulators | Recommended game setup | @@ -1663,9 +1667,9 @@ Consider the table below a work in progress as it's obvioulsy not fully populate | 3do | 3DO | | | | | 64dd | Nintendo 64DD | Mupen64Plus-Next (RetroArch) on Unix and Windows, ParaLLEl N64 (RetroArch) on macOS | ParaLLEl N64 (RetroArch) | | | ags | Adventure Game Studio game engine | | | | -| amiga | Commodore Amiga | P-UAE (RetroArch)* | | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disk, or in separate folder with .m3u playlist if multi-disk | -| amiga600 | Commodore Amiga 600 | P-UAE (RetroArch)* | | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disk, or in separate folder with .m3u playlist if multi-disk | -| amiga1200 | Commodore Amiga 1200 | P-UAE (RetroArch)* | | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disk, or in separate folder with .m3u playlist if multi-disk | +| amiga | Commodore Amiga | P-UAE (RetroArch)* | | 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 | P-UAE (RetroArch)* | | 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 | P-UAE (RetroArch)* | | 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 | | | | | amstradcpc | Amstrad CPC | | | | | apple2 | Apple II | | | | @@ -1683,7 +1687,7 @@ Consider the table below a work in progress as it's obvioulsy not fully populate | atarixe | Atari XE | | | | | atomiswave | Atomiswave | | | | | bbcmicro | BBC Micro | | | | -| c64 | Commodore 64 | VICE x64sc, accurate (RetroArch) | | Single disk, tape or cartridge image in root folder and/or multi-disk images in separate folder | +| c64 | Commodore 64 | VICE x64sc, accurate (RetroArch) | | Single disk, tape or cartridge image in root folder and/or multi-disc images in separate folder | | cavestory | Cave Story (NXEngine) | | | | | cdtv | Commodore CDTV | | | | | chailove | ChaiLove game engine | | | | @@ -1756,7 +1760,7 @@ Consider the table below a work in progress as it's obvioulsy not fully populate | ps4 | Sony PlayStation 4 | | | | | psp | Sony PlayStation Portable | | | | | psvita | Sony PlayStation Vita | | | | -| psx | Sony PlayStation | | | | +| psx | Sony PlayStation | Beetle PSX (RetroArch)* | Beetle PSX HW (RetroArch), PCSX ReARMed (RetroArch), DuckStation (RetroArch) | .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é | | | | | satellaview | Nintendo Satellaview | | | | diff --git a/USERGUIDE.md b/USERGUIDE.md index 909af41d5..81eada3a2 100644 --- a/USERGUIDE.md +++ b/USERGUIDE.md @@ -364,7 +364,7 @@ The platform name for the Commodore 64 is `c64`, so the following structure woul ~/ROMs/c64/Multidisk/Pirates/Pirates!.m3u ``` -It's highly recommended to create `.m3u` playlist files for multi-disk images as this normally automates disk swapping in the emulator. It's then this .m3u file that should be selected for launching the game. +It's highly recommended to create `.m3u` playlist files for multi-disc images as this normally automates disk swapping in the emulator. It's then this .m3u file that should be selected for launching the game. The .m3u file simply contains a list of the game files, for example in the case of Last Ninja 2.m3u: @@ -419,7 +419,7 @@ Apart from the potential difficulty in locating the emulator binary, there are s There are multiple ways to run Amiga games, but the recommended approach is to use WHDLoad. The best way is to use hard disk images in `.hdf` or `.hdz` format, meaning there will be a single file per game. This makes it just as easy to play Amiga games as any console with game ROMs. -An alternative would be to use `.adf` images as not all games may be available with WHDLoad support. For this, you can either put single-disk images in the root folder or in a dedicated adf directory, or multiple-disk games in separate folders. It's highly recommended to create `.m3u` playlist files for multi-disk images as described earlier. +An alternative would be to use `.adf` images as not all games may be available with WHDLoad support. For this, you can either put single-disk images in the root folder or in a dedicated adf directory, or multiple-disk games in separate folders. It's highly recommended to create `.m3u` playlist files for multi-disc images as described earlier. Here's an example of what the file structure could look like: @@ -859,7 +859,7 @@ If this setting is enabled and a folder has its flag set to be excluded from the **Scrape actual folders** _(Multi-scraper only)_ -Enabling this option causes folders themselves to be included by the scraper. This is useful for DOS games or any multi-disk games where there is a folder for each individual game. +Enabling this option causes folders themselves to be included by the scraper. This is useful for DOS games or any multi-disc games where there is a folder for each individual game. **Auto-retry on peer verification errors** _(ScreenScraper only)_ @@ -1206,7 +1206,7 @@ If this option is disabled, hidden files and folders within the ROMs directory t **Show hidden games (requires restart)** -You can mark games as hidden in the metadata editor, which is useful for instance for DOS games where you may not want to see some batch files and executables inside ES-DE, or for multi-disk games where you may only want to show the .m3u playlists and not the individual game files. By disabling this option these files will not be processed at all when ES-DE starts up. If you enable the option you will see the files, but their name entries will be almost transparent in the gamelist view to visually indicate that they are hidden. +You can mark games as hidden in the metadata editor, which is useful for instance for DOS games where you may not want to see some batch files and executables inside ES-DE, or for multi-disc games where you may only want to show the .m3u playlists and not the individual game files. By disabling this option these files will not be processed at all when ES-DE starts up. If you enable the option you will see the files, but their name entries will be almost transparent in the gamelist view to visually indicate that they are hidden. **Enable custom event scripts** @@ -1394,7 +1394,7 @@ A flag to mark whether the game is suitable for children. This will be applied a **Hidden** -A flag to indicate that the game is hidden. If the corresponding option has been set in the main menu, the game will not be shown. Useful for example for DOS games to hide batch scripts and unnecessary binaries or to hide the actual game files for multi-disk games. If a file or folder is flagged as hidden but the corresponding option to hide hidden games has not been enabled, then the opacity of the text will be lowered significantly to make it clear that it's a hidden entry. +A flag to indicate that the game is hidden. If the corresponding option has been set in the main menu, the game will not be shown. Useful for example for DOS games to hide batch scripts and unnecessary binaries or to hide the actual game files for multi-disc games. If a file or folder is flagged as hidden but the corresponding option to hide hidden games has not been enabled, then the opacity of the text will be lowered significantly to make it clear that it's a hidden entry. **Broken/not working** @@ -1402,15 +1402,15 @@ A flag to indicate whether the game is broken. Useful for MAME games for instanc **Exclude from game counter** _(files only)_ -A flag to indicate whether the game should be excluded from being counted. If this is set for a game, it will not be included in the game counter shown per system on the system view, and it will not be included in the system information field in the gamelist view. As well, it will be excluded from all automatic and custom collections. This option is quite useful for multi-file games such as multi-disk Amiga or Commodore 64 games, or for DOS games where you want to exclude setup programs and similar but still need them available in ES-DE and therefore can't hide them. Files that have this flag set will have a lower opacity in the gamelists, making them easy to spot. +A flag to indicate whether the game should be excluded from being counted. If this is set for a game, it will not be included in the game counter shown per system on the system view, and it will not be included in the system information field in the gamelist view. As well, it will be excluded from all automatic and custom collections. This option is quite useful for multi-file games such as multi-disc Amiga or Commodore 64 games, or for DOS games where you want to exclude setup programs and similar but still need them available in ES-DE and therefore can't hide them. Files that have this flag set will have a lower opacity in the gamelists, making them easy to spot. **Exclude from multi-scraper** -Whether to exclude the file from the multi-scraper. This is quite useful in order to avoid scraping all the disks for multi-disk games for example. There is an option in the scraper settings to ignore this flag, but by default the multi-scraper will respect it. +Whether to exclude the file from the multi-scraper. This is quite useful in order to avoid scraping all the disks for multi-disc games for example. There is an option in the scraper settings to ignore this flag, but by default the multi-scraper will respect it. **Hide metadata fields** -This option will hide most metadata fields in the gamelist view. The intention is to be able to hide the fields for situations such as general folders (Multi-disk, Cartridges etc.) and for setup programs and similar (e.g. SETUP.EXE or INSTALL.BAT for DOS games). It could also be used on the game files for multi-disk games where perhaps only the .m3u playlist should have any metadata values. The only fields shown with this option enabled are the game name and description. Using the description it's possible to write some comments regarding the file or folder, should you want to. It's also possible to display game images and videos with this setting enabled. +This option will hide most metadata fields in the gamelist view. The intention is to be able to hide the fields for situations such as general folders (Multi-disc, Cartridges etc.) and for setup programs and similar (e.g. SETUP.EXE or INSTALL.BAT for DOS games). It could also be used on the game files for multi-disc games where perhaps only the .m3u playlist should have any metadata values. The only fields shown with this option enabled are the game name and description. Using the description it's possible to write some comments regarding the file or folder, should you want to. It's also possible to display game images and videos with this setting enabled. **Launch command** _(files only)_ @@ -1625,9 +1625,9 @@ Consider the table below a work in progress as it's obvioulsy not fully populate | 3do | 3DO | | | | 64dd | Nintendo 64DD | RetroArch (Mupen64Plus-Next on Unix and Windows, ParaLLEl N64 on macOS) | | | ags | Adventure Game Studio game engine | | | -| amiga | Commodore Amiga | RetroArch (P-UAE)* | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disk, or in separate folder with .m3u playlist if multi-disk | -| amiga600 | Commodore Amiga 600 | RetroArch (P-UAE)* | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disk, or in separate folder with .m3u playlist if multi-disk | -| amiga1200 | Commodore Amiga 1200 | RetroArch (P-UAE)* | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disk, or in separate folder with .m3u playlist if multi-disk | +| amiga | Commodore Amiga | RetroArch (P-UAE)* | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disk, or in separate folder with .m3u playlist if multi-disc | +| amiga600 | Commodore Amiga 600 | RetroArch (P-UAE)* | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disk, or in separate folder with .m3u playlist if multi-disc | +| amiga1200 | Commodore Amiga 1200 | RetroArch (P-UAE)* | WHDLoad hard disk image in .hdf or .hdz format in root folder, or diskette image in .adf format in root folder if single-disk, or in separate folder with .m3u playlist if multi-disc | | amigacd32 | Commodore Amiga CD32 | | | | amstradcpc | Amstrad CPC | | | | apple2 | Apple II | | | @@ -1645,7 +1645,7 @@ Consider the table below a work in progress as it's obvioulsy not fully populate | atarixe | Atari XE | | | | atomiswave | Atomiswave | | | | bbcmicro | BBC Micro | | | -| c64 | Commodore 64 | RetroArch (VICE x64sc, accurate) | Single disk, tape or cartridge image in root folder and/or multi-disk images in separate folder | +| c64 | Commodore 64 | RetroArch (VICE x64sc, accurate) | Single disk, tape or cartridge image in root folder and/or multi-disc images in separate folder | | cavestory | Cave Story (NXEngine) | | | | cdtv | Commodore CDTV | | | | chailove | ChaiLove game engine | | | From db5fb48cf828c1f91a32cd8a9c5f7805af75d7b7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Sep 2021 22:53:08 +0200 Subject: [PATCH 42/64] OCD commit to fix some spelling inconsistencies. --- CHANGELOG.md | 2 +- es-core/src/InputManager.cpp | 2 +- es-core/src/renderers/Renderer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a7a848ae..2f5ba1f25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ ### Bug fixes -* Input consisting of only whitespace characters would get accepted by TextEditComponent which led to various strange behaviours +* 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 * When navigating menus, the separator lines and menu components did not align properly and moved up and down slightly diff --git a/es-core/src/InputManager.cpp b/es-core/src/InputManager.cpp index 8a0999efc..d69433ca4 100644 --- a/es-core/src/InputManager.cpp +++ b/es-core/src/InputManager.cpp @@ -411,7 +411,7 @@ bool InputManager::parseEvent(const SDL_Event& event, Window* window) return false; // The event filtering below is required as some controllers send button presses - // starting with the state 0 when using the D-pad. I consider this invalid behaviour + // starting with the state 0 when using the D-pad. I consider this invalid behavior // and the more popular controllers such as those from Microsoft and Sony do not show // this strange behavior. int buttonState = diff --git a/es-core/src/renderers/Renderer.cpp b/es-core/src/renderers/Renderer.cpp index 4a847b11a..1af81433c 100644 --- a/es-core/src/renderers/Renderer.cpp +++ b/es-core/src/renderers/Renderer.cpp @@ -151,7 +151,7 @@ namespace Renderer #if defined(__unix__) // Disabling desktop composition can lead to better framerates and a more fluid user - // interface, but with some drivers it can cause strange behaviours when returning to + // interface, but with some drivers it can cause strange behaviors when returning to // the desktop. if (Settings::getInstance()->getBool("DisableComposition")) SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "1"); From 64397bc6f0ddb5b6e955b097e6099af476d29e6c Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 22 Sep 2021 20:07:50 +0200 Subject: [PATCH 43/64] Fixed an issue where game names could not be refined when multi-scraping. Also fixed some refine game name inconsistencies when alternating between using the button shortcut and the ComponentGrid button. --- es-app/src/guis/GuiScraperMulti.cpp | 37 ++++++++++++++++++++++------ es-app/src/guis/GuiScraperSearch.cpp | 23 +++++++++++++---- es-app/src/guis/GuiScraperSearch.h | 4 +++ 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/es-app/src/guis/GuiScraperMulti.cpp b/es-app/src/guis/GuiScraperMulti.cpp index 441c23353..d2b07b0ce 100644 --- a/es-app/src/guis/GuiScraperMulti.cpp +++ b/es-app/src/guis/GuiScraperMulti.cpp @@ -79,13 +79,36 @@ GuiScraperMulti::GuiScraperMulti(Window* window, if (mApproveResults) { buttons.push_back( std::make_shared(mWindow, "REFINE SEARCH", "refine search", [&] { - // Refine the search, unless the result has already been accepted or we're in - // semi-automatic mode and there are less than 2 search results. - if (!mSearchComp->getAcceptedResult() && - !(mSearchComp->getSearchType() == GuiScraperSearch::ACCEPT_SINGLE_MATCHES && - mSearchComp->getScraperResultsSize() < 2)) { - mSearchComp->openInputScreen(mSearchQueue.front()); - mGrid.resetCursor(); + // Check whether we should allow a refine of the game name. + if (!mSearchComp->getAcceptedResult()) { + bool allowRefine = false; + + // Previously refined. + if (mSearchComp->getRefinedSearch()) + allowRefine = true; + // Interactive mode and "Auto-accept single game matches" not enabled. + else if (mSearchComp->getSearchType() != + GuiScraperSearch::ACCEPT_SINGLE_MATCHES) + allowRefine = true; + // Interactive mode with "Auto-accept single game matches" enabled and more + // than one result. + else if (mSearchComp->getSearchType() == + GuiScraperSearch::ACCEPT_SINGLE_MATCHES && + mSearchComp->getScraperResultsSize() > 1) + allowRefine = true; + // Dito but there were no games found, or the search has not been completed. + else if (mSearchComp->getSearchType() == + GuiScraperSearch::ACCEPT_SINGLE_MATCHES && + !mSearchComp->getFoundGame()) + allowRefine = true; + + if (allowRefine) { + // Copy any search refine that may have been previously entered by opening + // the input screen using the "Y" button shortcut. + mSearchQueue.front().nameOverride = mSearchComp->getNameOverride(); + mSearchComp->openInputScreen(mSearchQueue.front()); + mGrid.resetCursor(); + } } })); diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index 93d70ffa2..bd441a6a0 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -324,6 +324,7 @@ void GuiScraperSearch::search(const ScraperSearchParams& params) mBlockAccept = true; mAcceptedResult = false; mMiximageResult = false; + mFoundGame = false; mScrapeResult = {}; mResultList->clear(); @@ -545,13 +546,25 @@ bool GuiScraperSearch::input(InputConfig* config, Input input) return true; } - // Refine the search, unless the result has already been accepted or we're in semi-automatic - // mode and there are less than 2 search results. + // Check whether we should allow a refine of the game name. if (!mAcceptedResult && config->isMappedTo("y", input) && input.value != 0) { - if (mSearchType != ACCEPT_SINGLE_MATCHES || - (mSearchType == ACCEPT_SINGLE_MATCHES && mScraperResults.size() > 1)) { + bool allowRefine = false; + + // Previously refined. + if (mRefinedSearch) + allowRefine = true; + // Interactive mode and "Auto-accept single game matches" not enabled. + else if (mSearchType != ACCEPT_SINGLE_MATCHES) + allowRefine = true; + // Interactive mode with "Auto-accept single game matches" enabled and more than one result. + else if (mSearchType == ACCEPT_SINGLE_MATCHES && mScraperResults.size() > 1) + allowRefine = true; + // Dito but there were no games found, or the search has not been completed. + else if (mSearchType == ACCEPT_SINGLE_MATCHES && !mFoundGame) + allowRefine = true; + + if (allowRefine) openInputScreen(mLastSearch); - } } // Skip game, unless the result has already been accepted. diff --git a/es-app/src/guis/GuiScraperSearch.h b/es-app/src/guis/GuiScraperSearch.h index 9b05ed7cc..cdd86830e 100644 --- a/es-app/src/guis/GuiScraperSearch.h +++ b/es-app/src/guis/GuiScraperSearch.h @@ -81,6 +81,10 @@ public: void onSizeChanged() override; void unsetRefinedSearch() { mRefinedSearch = false; } + bool getRefinedSearch() { return mRefinedSearch; } + bool getFoundGame() { return mFoundGame; } + const std::string& getNameOverride() { return mLastSearch.nameOverride; } + void onFocusGained() override { mGrid.onFocusGained(); } void onFocusLost() override { mGrid.onFocusLost(); } From 1b19ab99b167cc5ea8b4928fde01bdfca4ddef11 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 22 Sep 2021 20:10:34 +0200 Subject: [PATCH 44/64] Fixed an issue where 'No games found' results could be accepted when multi-scraping. --- es-app/src/guis/GuiScraperSearch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index bd441a6a0..22ceac3ff 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -542,7 +542,7 @@ void GuiScraperSearch::updateInfoPane() bool GuiScraperSearch::input(InputConfig* config, Input input) { if (config->isMappedTo("a", input) && input.value != 0) { - if (mBlockAccept) + if (mBlockAccept || mScraperResults.empty()) return true; } From 401a7ae30c94eb00a4da2232bc7c223f02993e9c Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 22 Sep 2021 20:24:23 +0200 Subject: [PATCH 45/64] Added alternative emulators to the atari2600, genesis, megadrive, snes and snesna systems. --- resources/systems/macos/es_systems.xml | 33 ++++++++++++++++------ resources/systems/unix/es_systems.xml | 35 ++++++++++++++++++------ resources/systems/windows/es_systems.xml | 35 ++++++++++++++++++------ 3 files changed, 76 insertions(+), 27 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index c25afa153..3835bd6f6 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -117,7 +117,8 @@ Atari 2600 %ROMPATH%/atari2600 .a26 .A26 .bin .BIN .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella2014_libretro.dylib %ROM% atari2600 atari2600 @@ -427,8 +428,11 @@ genesis Sega Genesis %ROMPATH%/genesis - .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% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_libretro.dylib %ROM% genesis genesis @@ -547,8 +551,11 @@ megadrive Sega Mega Drive %ROMPATH%/megadrive - .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% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_libretro.dylib %ROM% megadrive megadrive @@ -996,8 +1003,12 @@ snes Nintendo SNES (Super Nintendo) %ROMPATH%/snes - .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% + .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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% snes snes @@ -1005,8 +1016,12 @@ snesna Nintendo SNES (Super Nintendo) %ROMPATH%/snesna - .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% + .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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% snes snesna diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index b284cd492..2bafbc3b5 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -118,7 +118,8 @@ Atari 2600 %ROMPATH%/atari2600 .a26 .A26 .bin .BIN .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella2014_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella2014_libretro.so %ROM% atari2600 atari2600 @@ -428,8 +429,11 @@ genesis Sega Genesis %ROMPATH%/genesis - .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% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_libretro.so %ROM% genesis genesis @@ -548,8 +552,11 @@ megadrive Sega Mega Drive %ROMPATH%/megadrive - .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% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_libretro.so %ROM% megadrive megadrive @@ -998,8 +1005,13 @@ snes Nintendo SNES (Super Nintendo) %ROMPATH%/snes - .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% + .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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%/mednafen_supafaust_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_libretro.so %ROM% snes snes @@ -1007,8 +1019,13 @@ snesna Nintendo SNES (Super Nintendo) %ROMPATH%/snesna - .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% + .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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%/mednafen_supafaust_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_libretro.so %ROM% snes snesna diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 1b08cfa92..01b067026 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -118,7 +118,8 @@ Atari 2600 %ROMPATH%\atari2600 .a26 .A26 .bin .BIN .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\stella_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\stella_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\stella2014_libretro.dll %ROM% atari2600 atari2600 @@ -428,8 +429,11 @@ genesis Sega Genesis %ROMPATH%\genesis - .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% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\blastem_libretro.dll %ROM% genesis genesis @@ -548,8 +552,11 @@ megadrive Sega Mega Drive %ROMPATH%\megadrive - .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% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\blastem_libretro.dll %ROM% megadrive megadrive @@ -998,8 +1005,13 @@ snes Nintendo SNES (Super Nintendo) %ROMPATH%\snes - .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% + .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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%\mednafen_supafaust_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen-s_libretro.dll %ROM% snes snes @@ -1007,8 +1019,13 @@ snesna Nintendo SNES (Super Nintendo) %ROMPATH%\snesna - .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% + .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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%\mednafen_supafaust_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen-s_libretro.dll %ROM% snes snesna From 67cfb319c7b71f3a3cecd257006be233df7c1577 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 22 Sep 2021 20:33:28 +0200 Subject: [PATCH 46/64] Documentation update. --- CHANGELOG.md | 3 + USERGUIDE-DEV.md | 297 ++++++++++++++++++++++++----------------------- 2 files changed, 154 insertions(+), 146 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f5ba1f25..47490f339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,9 @@ ### Bug fixes +* When multi-scraping in interactive mode with "Auto-accept single game matches" enabled, the game name could not be refined if there were no games found +* 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 +* When multi-scraping in interactive mode, "No games found" results could be accepted using the "A" button * 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 diff --git a/USERGUIDE-DEV.md b/USERGUIDE-DEV.md index 99575a382..e63a97cb3 100644 --- a/USERGUIDE-DEV.md +++ b/USERGUIDE-DEV.md @@ -1636,17 +1636,19 @@ Refer to the [INSTALL-DEV.md](INSTALL-DEV.md#command-line-options) document for Note as well that the list and corresponding es_systems.xml templates may not reflect what is readily available for all supported operating system. This is especially true on Unix/Linux if installing RetroArch via the OS repository instead of using the Snap or Flatpak distributions (or compiling from source code) as the repository versions are normally quite crippled. -The column **Game system name** corresponds to the directory where you should put your game files, e.g. `~/ROMs/c64` or `~/ROMs/megadrive`. +The column **System name** corresponds to the directory where you should put your game files, e.g. `~/ROMs/c64` or `~/ROMs/megadrive`. -Regional differences are handled by simply using the game system name corresponding to your region. For example for Sega Mega Drive, _megadrive_ would be used by most people in the world, although persons from North America would use _genesis_ instead. The same is true for _pcengine_ vs _tg16_ etc. This only affects the theme selection and the corresponding theme graphics, the same emulator and scraper settings are still used for the regional variants although that can of course be modified in the es_systems.xml file if you wish. +Regional differences are handled by simply using the game system name corresponding to your region. For example for Sega Mega Drive, _megadrive_ would be used by most people in the world, although persons from North America would use _genesis_ instead. The same is true for _pcengine_ vs _tg16_ etc. This only affects the theme selection and the corresponding theme graphics, the same emulator and scraper settings are still used for the regional variants although that can of course be customized in the es_systems.xml file if you wish. Sometimes the name of the console is (more or less) the same for multiple regions, and in those cases the region has been added as a suffix to the game system name. For instance `na` for North America has been added to `snes` (Super Nintendo) giving the system name `snesna`. The same goes for Japan, as in `megacd` and `megacdjp`. Again, this only affects the theme and theme graphics. -For the **Full name** column, text inside square brackets [] are comments and not part of the actual game system name. +For the **Full name** column, text inside square brackets [] are comments and not part of the actual system name. -The **Default emulator** column lists the primary emulator as configured in es_systems.xml. Any system marked with an asterisk (*) in this column requires additional system/BIOS ROMs to run, as should be explained by the emulator documentation. Good starting points for such documentation are [https://docs.libretro.com](https://docs.libretro.com) and [https://docs.libretro.com/library/bios](https://docs.libretro.com/library/bios) +The **Default emulator** column lists the primary emulator as configured in es_systems.xml. If this differs between Unix, macOS and Windows that is specified in square brackets, such as [UW] for Unix and Windows and [M] for macOS. If not all of the three platforms are specified it means that the system is not available on those platforms. For example Lutris which is only avaialable on Unix is marked as _Lutris application [U]_. -The **Alternative emulators** column lists additional emulators configured in es_systems.xml that can be selected per system and per game, as explained earlier in this guide. Note that not all of these emulators may be available on all operating systems. +The **Alternative emulators** column lists additional emulators configured in es_systems.xml that can be selected per system and per game, as explained earlier in this guide. In the same manner as the _Default emulator_ column, differences between Unix, macOS and Windows are marked using square brackets. + +The **BIOS required** column indicates if additional BIOS/system ROMs are required, as should be explained by the emulator documentation. Good starting points for such documentation are [https://docs.libretro.com](https://docs.libretro.com) and [https://docs.libretro.com/library/bios](https://docs.libretro.com/library/bios) For additional details regarding which game file extensions are supported per system, refer to the es_systems.xml files [unix/es_systems.xml](resources/systems/unix/es_systems.xml), [macos/es_systems.xml](resources/systems/macos/es_systems.xml) and [windows/es_systems.xml](resources/systems/windows/es_systems.xml). Normally the extensions setup in these files should cover everything that the emulators support. Note that for systems that have alternative emulators defined, the list of extensions is a combination of what is supported by all the emulators. This approach is necessary as you want to be able to see all games for each system while potentially testing and switching between different emulators, either system-wide or on a per game basis. @@ -1662,144 +1664,147 @@ In general .zip or .7z files are recommended for smaller-sized games like those Consider the table below a work in progress as it's obvioulsy not fully populated yet! -| Game system name | Full name | Default emulator | Alternative emulators | Recommended game setup | -| :-------------------- | :--------------------------------------------- | :-------------------------------- | :-------------------------------- | :----------------------------------- | -| 3do | 3DO | | | | -| 64dd | Nintendo 64DD | Mupen64Plus-Next (RetroArch) on Unix and Windows, ParaLLEl N64 (RetroArch) on macOS | ParaLLEl N64 (RetroArch) | | -| ags | Adventure Game Studio game engine | | | | -| amiga | Commodore Amiga | P-UAE (RetroArch)* | | 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 | P-UAE (RetroArch)* | | 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 | P-UAE (RetroArch)* | | 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 | | | | -| amstradcpc | Amstrad CPC | | | | -| apple2 | Apple II | | | | -| apple2gs | Apple IIGS | | | | -| arcade | Arcade | MAME - Current (RetroArch)* | MAME 2000 (RetroArch), MAME 2003-Plus (RetroArch), MAME 2010 (RetroArch) | Single archive file following MAME name standard in root folder | -| astrocade | Bally Astrocade | | | | -| atari2600 | Atari 2600 | Stella (RetroArch) on macOS and Windows, Stella 2014 (RetroArch) on Unix | | Single archive or ROM file in root folder | -| atari5200 | Atari 5200 | | | | -| atari7800 | Atari 7800 ProSystem | | | | -| atari800 | Atari 800 | | | | -| atarijaguar | Atari Jaguar | | | | -| atarijaguarcd | Atari Jaguar CD | | | | -| atarilynx | Atari Lynx | | | | -| atarist | Atari ST [also STE and Falcon] | | | | -| atarixe | Atari XE | | | | -| atomiswave | Atomiswave | | | | -| bbcmicro | BBC Micro | | | | -| c64 | Commodore 64 | VICE x64sc, accurate (RetroArch) | | Single disk, tape or cartridge image in root folder and/or multi-disc images in separate folder | -| cavestory | Cave Story (NXEngine) | | | | -| cdtv | Commodore CDTV | | | | -| chailove | ChaiLove game engine | | | | -| channelf | Fairchild Channel F | | | | -| coco | Tandy Color Computer | | | | -| colecovision | ColecoVision | | | | -| daphne | Daphne Arcade Laserdisc Emulator | | | | -| desktop | Desktop applications | N/A | | | -| doom | Doom | | | | -| dos | DOS (PC) | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch), DOSBox-SVN (RetroArch) | In separate folder (one folder per game, with complete file structure retained) | -| dragon32 | Dragon 32 | | | | -| dreamcast | Sega Dreamcast | | | | -| famicom | Nintendo Family Computer | Nestopia UE (RetroArch) | FCEUmm (RetroArch), Mesen (RetroArch), QuickNES (RetroArch) | Single archive or ROM file in root folder | -| fba | FinalBurn Alpha | FB Alpha 2012 (RetroArch)* | | Single archive file following MAME name standard in root folder | -| fbneo | FinalBurn Neo | FinalBurn Neo (RetroArch)* | | Single archive file following MAME name standard in root folder | -| fds | Nintendo Famicom Disk System | Nestopia UE (RetroArch)* | | Single archive or ROM file in root folder | -| gameandwatch | Nintendo Game and Watch | | | | -| gamegear | Sega Game Gear | | | | -| gb | Nintendo Game Boy | | | | -| gba | Nintendo Game Boy Advance | | | | -| gbc | Nintendo Game Boy Color | | | | -| gc | Nintendo GameCube | | | | -| genesis | Sega Genesis | Genesis Plus GX (RetroArch) | | Single archive or ROM file in root folder | -| gx4000 | Amstrad GX4000 | | | | -| intellivision | Mattel Electronics Intellivision | | | | -| kodi | Kodi home theatre software | N/A | | | -| lutris | Lutris open gaming platform | Lutris application (Unix only) | | Shell script in root folder | -| lutro | Lutro game engine | | | | -| macintosh | Apple Macintosh | | | | -| mame | Multiple Arcade Machine Emulator | MAME 2003-Plus (RetroArch)* | MAME 2000 (RetroArch), MAME 2010 (RetroArch), MAME - Current (RetroArch) | Single archive file following MAME name standard in root folder | -| mame-advmame | AdvanceMAME | | | Single archive file following MAME name standard in root folder | -| mame-mame4all | MAME4ALL | | | Single archive file following MAME name standard in root folder | -| mastersystem | Sega Master System | Genesis Plus GX (RetroArch) | | Single archive or ROM file in root folder | -| megacd | Sega Mega-CD | | | | -| megacdjp | Sega Mega-CD [Japan] | | | | -| megadrive | Sega Mega Drive | Genesis Plus GX (RetroArch) | | Single archive or ROM file in root folder | -| mess | Multi Emulator Super System | | | | -| moonlight | Moonlight game streaming | | | | -| moto | Thomson MO/TO series | Theodore (RetroArch) | | | -| msx | MSX | blueMSX (RetroArch) | | | -| msx1 | MSX1 | blueMSX (RetroArch) | | | -| msx2 | MSX2 | blueMSX (RetroArch) | | | -| msxturbor | MSX Turbo R | blueMSX (RetroArch) | | | -| multivision | Othello Multivision | Gearsystem (RetroArch) | | | -| naomi | Sega NAOMI | Flycast (RetroArch) | | | -| naomigd | Sega NAOMI GD-ROM | Flycast (RetroArch) | | | -| n3ds | Nintendo 3DS | Citra (RetroArch) | | | -| n64 | Nintendo 64 | Mupen64Plus-Next (RetroArch) on Unix and Windows, ParaLLEl N64 (RetroArch) on macOS | ParaLLEl N64 (RetroArch) | Single archive or ROM file in root folder | -| nds | Nintendo DS | | | | -| neogeo | SNK Neo Geo | FinalBurn Neo (RetroArch)* | | Single archive file following MAME name standard in root folder | -| neogeocd | SNK Neo Geo CD | NeoCD (RetroArch)* | | Single archive in root folder (which includes the CD image and ripped audio) | -| neogeocdjp | SNK Neo Geo CD [Japan] | NeoCD (RetroArch)* | | Single archive in root folder (which includes the CD image and ripped audio) | -| nes | Nintendo Entertainment System | Nestopia UE (RetroArch) | FCEUmm (RetroArch), Mesen (RetroArch), QuickNES (RetroArch) | Single archive or ROM file in root folder | -| ngp | SNK Neo Geo Pocket | | | | -| ngpc | SNK Neo Geo Pocket Color | | | | -| odyssey2 | Magnavox Odyssey2 | | | | -| openbor | OpenBOR game engine | | | | -| oric | Tangerine Computer Systems Oric | | | | -| palm | Palm OS | | | | -| pc | IBM PC | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch), DOSBox-SVN (RetroArch) | In separate folder (one folder per game, with complete file structure retained) | -| pc88 | NEC PC-8800 series | QUASI88 (RetroArch) | | | -| pc98 | NEC PC-9800 series | Neko Project II Kai (RetroArch) | | | -| pcengine | NEC PC Engine | Beetle PCE (RetroArch) | | Single archive or ROM file in root folder | -| pcenginecd | NEC PC Engine CD | Beetle PCE (RetroArch) | | | -| pcfx | NEC PC-FX | | | | -| pokemini | Nintendo Pokémon Mini | | | | -| ports | Ports | N/A | | Shell/batch script in separate folder (possibly combined with game data) | -| ps2 | Sony PlayStation 2 | | | | -| ps3 | Sony PlayStation 3 | | | | -| ps4 | Sony PlayStation 4 | | | | -| psp | Sony PlayStation Portable | | | | -| psvita | Sony PlayStation Vita | | | | -| psx | Sony PlayStation | Beetle PSX (RetroArch)* | Beetle PSX HW (RetroArch), PCSX ReARMed (RetroArch), DuckStation (RetroArch) | .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é | | | | -| satellaview | Nintendo Satellaview | | | | -| saturn | Sega Saturn | Beetle Saturn (RetroArch) | | | -| saturnjp | Sega Saturn [Japan] | Beetle Saturn (RetroArch) | | | -| scummvm | ScummVM game engine | ScummVM (RetroArch) | | In separate folder (one folder per game, with complete file structure retained) | -| sega32x | Sega Mega Drive 32X | PicoDrive (RetroArch) | | Single archive or ROM file in root folder | -| sega32xjp | Sega Super 32X [Japan] | PicoDrive (RetroArch) | | Single archive or ROM file in root folder | -| sega32xna | Sega Genesis 32X [North America] | PicoDrive (RetroArch) | | Single archive or ROM file in root folder | -| segacd | Sega CD | | | | -| sg-1000 | Sega SG-1000 | | | | -| snes | Nintendo SNES (Super Nintendo) | Snes9x - Current (RetroARch) | | Single archive or ROM file in root folder | -| snesna | Nintendo SNES (Super Nintendo) [North America] | Snes9x - Current (RetroARch) | | Single archive or ROM file in root folder | -| solarus | Solarus game engine | | | | -| spectravideo | Spectravideo | | | | -| steam | Valve Steam | Steam application | | Shell script/batch file in root folder | -| stratagus | Stratagus game engine | | | | -| sufami | Bandai SuFami Turbo | | | | -| supergrafx | NEC SuperGrafx | | | | -| switch | Nintendo Switch | Yuzu (Linux and Windows only) | | | -| tanodragon | Tano Dragon | | | | -| tg16 | NEC TurboGrafx-16 | Beetle PCE (RetroArch) | | Single archive or ROM file in root folder | -| tg-cd | NEC TurboGrafx-CD | Beetle PCE (RetroArch) | | | -| ti99 | Texas Instruments TI-99 | | | | -| tic80 | TIC-80 game engine | | | | -| to8 | Thomson TO8 | Theodore (RetroArch) | | | -| trs-80 | Tandy TRS-80 | | | | -| uzebox | Uzebox | | | | -| vectrex | Vectrex | | | | -| videopac | Philips Videopac G7000 (Magnavox Odyssey2) | | | | -| virtualboy | Nintendo Virtual Boy | | | | -| wii | Nintendo Wii | | | | -| wiiu | Nintendo Wii U | | | | -| wonderswan | Bandai WonderSwan | | | | -| wonderswancolor | Bandai WonderSwan Color | | | | -| x1 | Sharp X1 | x1 (RetroArch) | | Single archive or ROM file in root folder | -| x68000 | Sharp X68000 | | | | -| xbox | Microsoft Xbox | | | | -| xbox360 | Microsoft Xbox 360 | | | | -| zmachine | Infocom Z-machine | | | | -| zx81 | Sinclair ZX81 | | | | -| zxspectrum | Sinclair ZX Spectrum | | | | +Default emulator/Alternative emulators columns: \ +**[U]**: Unix, **[M]**: macOS, **[W]**: Windows + +| System name | Full name | Default emulator | Alternative emulators | BIOS required | Recommended game setup | +| :-------------------- | :--------------------------------------------- | :-------------------------------- | :-------------------------------- | :------------ | :----------------------------------- | +| 3do | 3DO | | | | | +| 64dd | Nintendo 64DD | Mupen64Plus-Next (RetroArch) [UW], ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | | | +| ags | Adventure Game Studio game engine | | | | | +| amiga | Commodore Amiga | P-UAE (RetroArch) | | 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 | P-UAE (RetroArch) | | 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 | P-UAE (RetroArch) | | 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 | | | | | +| amstradcpc | Amstrad CPC | | | | | +| apple2 | Apple II | | | | | +| apple2gs | Apple IIGS | | | | | +| arcade | Arcade | MAME - Current (RetroArch) | MAME 2000 (RetroArch), MAME 2003-Plus (RetroArch), MAME 2010 (RetroArch) | Depends | Single archive file following MAME name standard in root folder | +| astrocade | Bally Astrocade | | | | | +| atari2600 | Atari 2600 | Stella (RetroArch) | Stella 2014 (RetroArch) | No | Single archive or ROM file in root folder | +| atari5200 | Atari 5200 | | | | | +| atari7800 | Atari 7800 ProSystem | | | | | +| atari800 | Atari 800 | | | | | +| atarijaguar | Atari Jaguar | | | | | +| atarijaguarcd | Atari Jaguar CD | | | | | +| atarilynx | Atari Lynx | | | | | +| atarist | Atari ST [also STE and Falcon] | | | | | +| atarixe | Atari XE | | | | | +| atomiswave | Atomiswave | | | | | +| bbcmicro | BBC Micro | | | | | +| c64 | Commodore 64 | VICE x64sc, accurate (RetroArch) | | No | Single disk, tape or cartridge image in root folder and/or multi-disc images in separate folder | +| cavestory | Cave Story (NXEngine) | | | | | +| cdtv | Commodore CDTV | | | | | +| chailove | ChaiLove game engine | | | | | +| channelf | Fairchild Channel F | | | | | +| coco | Tandy Color Computer | | | | | +| colecovision | ColecoVision | | | | | +| daphne | Daphne Arcade Laserdisc Emulator | | | | | +| desktop | Desktop applications | N/A | | No | | +| doom | Doom | | | | | +| dos | DOS (PC) | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch), DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | +| dragon32 | Dragon 32 | | | | | +| dreamcast | Sega Dreamcast | | | | | +| famicom | Nintendo Family Computer | Nestopia UE (RetroArch) | FCEUmm (RetroArch), Mesen (RetroArch), QuickNES (RetroArch) | No | Single archive or ROM file in root folder | +| fba | FinalBurn Alpha | FB Alpha 2012 (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | +| fbneo | FinalBurn Neo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | +| fds | Nintendo Famicom Disk System | Nestopia UE (RetroArch) | | Yes | Single archive or ROM file in root folder | +| gameandwatch | Nintendo Game and Watch | | | | | +| gamegear | Sega Game Gear | | | | | +| gb | Nintendo Game Boy | | | | | +| gba | Nintendo Game Boy Advance | | | | | +| gbc | Nintendo Game Boy Color | | | | | +| gc | Nintendo GameCube | | | | | +| genesis | Sega Genesis | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch), PicoDrive (RetroArch), BlastEm (RetroArch) | No | Single archive or ROM file in root folder | +| gx4000 | Amstrad GX4000 | | | | | +| intellivision | Mattel Electronics Intellivision | | | | | +| kodi | Kodi home theatre software | N/A | | No | | +| lutris | Lutris open gaming platform | Lutris application [U] | | No | Shell script in root folder | +| lutro | Lutro game engine | | | | | +| macintosh | Apple Macintosh | | | | | +| mame | Multiple Arcade Machine Emulator | MAME 2003-Plus (RetroArch) | MAME 2000 (RetroArch), MAME 2010 (RetroArch), MAME - Current (RetroArch) | 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 (RetroArch) | | No | Single archive or ROM file in root folder | +| megacd | Sega Mega-CD | | | | | +| megacdjp | Sega Mega-CD [Japan] | | | | | +| megadrive | Sega Mega Drive | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch), PicoDrive (RetroArch), BlastEm (RetroArch) | No | Single archive or ROM file in root folder | +| mess | Multi Emulator Super System | | | | | +| moonlight | Moonlight game streaming | | | | | +| moto | Thomson MO/TO series | Theodore (RetroArch) | | | | +| msx | MSX | blueMSX (RetroArch) | | | | +| msx1 | MSX1 | blueMSX (RetroArch) | | | | +| msx2 | MSX2 | blueMSX (RetroArch) | | | | +| msxturbor | MSX Turbo R | blueMSX (RetroArch) | | | | +| multivision | Othello Multivision | Gearsystem (RetroArch) | | | | +| naomi | Sega NAOMI | Flycast (RetroArch) | | | | +| naomigd | Sega NAOMI GD-ROM | Flycast (RetroArch) | | | | +| n3ds | Nintendo 3DS | Citra (RetroArch) | | | | +| n64 | Nintendo 64 | Mupen64Plus-Next (RetroArch) [UW], ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | No | Single archive or ROM file in root folder | +| nds | Nintendo DS | | | | | +| neogeo | SNK Neo Geo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | +| neogeocd | SNK Neo Geo CD | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | +| neogeocdjp | SNK Neo Geo CD [Japan] | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | +| nes | Nintendo Entertainment System | Nestopia UE (RetroArch) | FCEUmm (RetroArch), Mesen (RetroArch), QuickNES (RetroArch) | No | Single archive or ROM file in root folder | +| ngp | SNK Neo Geo Pocket | | | | | +| ngpc | SNK Neo Geo Pocket Color | | | | | +| odyssey2 | Magnavox Odyssey2 | | | | | +| openbor | OpenBOR game engine | | | | | +| oric | Tangerine Computer Systems Oric | | | | | +| palm | Palm OS | | | | | +| pc | IBM PC | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch), DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | +| pc88 | NEC PC-8800 series | QUASI88 (RetroArch) | | | | +| pc98 | NEC PC-9800 series | Neko Project II Kai (RetroArch) | | | | +| pcengine | NEC PC Engine | Beetle PCE (RetroArch) | | No | Single archive or ROM file in root folder | +| pcenginecd | NEC PC Engine CD | Beetle PCE (RetroArch) | | Yes | | +| pcfx | NEC PC-FX | | | | | +| pokemini | Nintendo Pokémon Mini | | | No | | +| ports | Ports | N/A | | No | Shell/batch script in separate folder (possibly combined with game data) | +| ps2 | Sony PlayStation 2 | | | | | +| ps3 | Sony PlayStation 3 | | | | | +| ps4 | Sony PlayStation 4 | | | | | +| psp | Sony PlayStation Portable | | | | | +| psvita | Sony PlayStation Vita | | | | | +| psx | Sony PlayStation | Beetle PSX (RetroArch) | Beetle PSX HW (RetroArch), PCSX ReARMed (RetroArch), DuckStation (RetroArch) | 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é | | | | | +| satellaview | Nintendo Satellaview | | | | | +| saturn | Sega Saturn | Beetle Saturn (RetroArch) | | | | +| saturnjp | Sega Saturn [Japan] | Beetle Saturn (RetroArch) | | | | +| scummvm | ScummVM game engine | ScummVM (RetroArch) | | No | In separate folder (one folder per game, with complete file structure retained) | +| sega32x | Sega Mega Drive 32X | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | +| sega32xjp | Sega Super 32X [Japan] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | +| sega32xna | Sega Genesis 32X [North America] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | +| segacd | Sega CD | | | | | +| sg-1000 | Sega SG-1000 | | | | | +| snes | Nintendo SNES (Super Nintendo) | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch), bsnes (RetroArch), bsnes-mercury Accuracy (RetroArch), Beetle Supafaust (RetroArch) [UW], Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | +| snesna | Nintendo SNES (Super Nintendo) [North America] | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch), bsnes (RetroArch), bsnes-mercury Accuracy (RetroArch), Beetle Supafaust (RetroArch) [UW], Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | +| solarus | Solarus game engine | | | | | +| spectravideo | Spectravideo | | | | | +| steam | Valve Steam | Steam application | | No | Shell script/batch file in root folder | +| stratagus | Stratagus game engine | | | | | +| sufami | Bandai SuFami Turbo | | | | | +| supergrafx | NEC SuperGrafx | | | | | +| switch | Nintendo Switch | Yuzu [UW] | | Yes | | +| tanodragon | Tano Dragon | | | | | +| tg16 | NEC TurboGrafx-16 | Beetle PCE (RetroArch) | | No | Single archive or ROM file in root folder | +| tg-cd | NEC TurboGrafx-CD | Beetle PCE (RetroArch) | | Yes | | +| ti99 | Texas Instruments TI-99 | | | | | +| tic80 | TIC-80 game engine | | | | | +| to8 | Thomson TO8 | Theodore (RetroArch) | | | | +| trs-80 | Tandy TRS-80 | | | | | +| uzebox | Uzebox | | | | | +| vectrex | Vectrex | | | | | +| videopac | Philips Videopac G7000 (Magnavox Odyssey2) | | | | | +| virtualboy | Nintendo Virtual Boy | | | | | +| wii | Nintendo Wii | | | | | +| wiiu | Nintendo Wii U | | | | | +| wonderswan | Bandai WonderSwan | | | | | +| wonderswancolor | Bandai WonderSwan Color | | | | | +| x1 | Sharp X1 | x1 (RetroArch) | | | Single archive or ROM file in root folder | +| x68000 | Sharp X68000 | | | | | +| xbox | Microsoft Xbox | | | | | +| xbox360 | Microsoft Xbox 360 | | | | | +| zmachine | Infocom Z-machine | | | | | +| zx81 | Sinclair ZX81 | | | | | +| zxspectrum | Sinclair ZX Spectrum | | | | | From c74896eaa3730495ed5a920554bb32b8a80cb972 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 22 Sep 2021 20:48:43 +0200 Subject: [PATCH 47/64] Reformatted the supported systems list in the user guide. --- USERGUIDE-DEV.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/USERGUIDE-DEV.md b/USERGUIDE-DEV.md index e63a97cb3..fc0d168c1 100644 --- a/USERGUIDE-DEV.md +++ b/USERGUIDE-DEV.md @@ -1670,7 +1670,7 @@ Default emulator/Alternative emulators columns: \ | System name | Full name | Default emulator | Alternative emulators | BIOS required | Recommended game setup | | :-------------------- | :--------------------------------------------- | :-------------------------------- | :-------------------------------- | :------------ | :----------------------------------- | | 3do | 3DO | | | | | -| 64dd | Nintendo 64DD | Mupen64Plus-Next (RetroArch) [UW], ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | | | +| 64dd | Nintendo 64DD | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | | | | ags | Adventure Game Studio game engine | | | | | | amiga | Commodore Amiga | P-UAE (RetroArch) | | 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 | P-UAE (RetroArch) | | 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 | @@ -1679,7 +1679,7 @@ Default emulator/Alternative emulators columns: \ | amstradcpc | Amstrad CPC | | | | | | apple2 | Apple II | | | | | | apple2gs | Apple IIGS | | | | | -| arcade | Arcade | MAME - Current (RetroArch) | MAME 2000 (RetroArch), MAME 2003-Plus (RetroArch), MAME 2010 (RetroArch) | Depends | Single archive file following MAME name standard in root folder | +| arcade | Arcade | MAME - Current (RetroArch) | MAME 2000 (RetroArch)
MAME 2003-Plus (RetroArch)
MAME 2010 (RetroArch) | Depends | Single archive file following MAME name standard in root folder | | astrocade | Bally Astrocade | | | | | | atari2600 | Atari 2600 | Stella (RetroArch) | Stella 2014 (RetroArch) | No | Single archive or ROM file in root folder | | atari5200 | Atari 5200 | | | | | @@ -1702,10 +1702,10 @@ Default emulator/Alternative emulators columns: \ | daphne | Daphne Arcade Laserdisc Emulator | | | | | | desktop | Desktop applications | N/A | | No | | | doom | Doom | | | | | -| dos | DOS (PC) | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch), DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | +| dos | DOS (PC) | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | | dragon32 | Dragon 32 | | | | | | dreamcast | Sega Dreamcast | | | | | -| famicom | Nintendo Family Computer | Nestopia UE (RetroArch) | FCEUmm (RetroArch), Mesen (RetroArch), QuickNES (RetroArch) | No | Single archive or ROM file in root folder | +| famicom | Nintendo Family Computer | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | | fba | FinalBurn Alpha | FB Alpha 2012 (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | | fbneo | FinalBurn Neo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | | fds | Nintendo Famicom Disk System | Nestopia UE (RetroArch) | | Yes | Single archive or ROM file in root folder | @@ -1715,20 +1715,20 @@ Default emulator/Alternative emulators columns: \ | gba | Nintendo Game Boy Advance | | | | | | gbc | Nintendo Game Boy Color | | | | | | gc | Nintendo GameCube | | | | | -| genesis | Sega Genesis | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch), PicoDrive (RetroArch), BlastEm (RetroArch) | No | Single archive or ROM file in root folder | +| genesis | Sega Genesis | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | | gx4000 | Amstrad GX4000 | | | | | | intellivision | Mattel Electronics Intellivision | | | | | | kodi | Kodi home theatre software | N/A | | No | | | lutris | Lutris open gaming platform | Lutris application [U] | | No | Shell script in root folder | | lutro | Lutro game engine | | | | | | macintosh | Apple Macintosh | | | | | -| mame | Multiple Arcade Machine Emulator | MAME 2003-Plus (RetroArch) | MAME 2000 (RetroArch), MAME 2010 (RetroArch), MAME - Current (RetroArch) | Depends | Single archive file following MAME name standard in root folder | +| mame | Multiple Arcade Machine Emulator | MAME 2003-Plus (RetroArch) | MAME 2000 (RetroArch)
MAME 2010 (RetroArch)
MAME - Current (RetroArch) | 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 (RetroArch) | | No | Single archive or ROM file in root folder | | megacd | Sega Mega-CD | | | | | | megacdjp | Sega Mega-CD [Japan] | | | | | -| megadrive | Sega Mega Drive | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch), PicoDrive (RetroArch), BlastEm (RetroArch) | No | Single archive or ROM file in root folder | +| megadrive | Sega Mega Drive | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | | mess | Multi Emulator Super System | | | | | | moonlight | Moonlight game streaming | | | | | | moto | Thomson MO/TO series | Theodore (RetroArch) | | | | @@ -1740,19 +1740,19 @@ Default emulator/Alternative emulators columns: \ | naomi | Sega NAOMI | Flycast (RetroArch) | | | | | naomigd | Sega NAOMI GD-ROM | Flycast (RetroArch) | | | | | n3ds | Nintendo 3DS | Citra (RetroArch) | | | | -| n64 | Nintendo 64 | Mupen64Plus-Next (RetroArch) [UW], ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | No | Single archive or ROM file in root folder | +| n64 | Nintendo 64 | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | No | Single archive or ROM file in root folder | | nds | Nintendo DS | | | | | | neogeo | SNK Neo Geo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | | neogeocd | SNK Neo Geo CD | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | | neogeocdjp | SNK Neo Geo CD [Japan] | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | -| nes | Nintendo Entertainment System | Nestopia UE (RetroArch) | FCEUmm (RetroArch), Mesen (RetroArch), QuickNES (RetroArch) | No | Single archive or ROM file in root folder | +| nes | Nintendo Entertainment System | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | | ngp | SNK Neo Geo Pocket | | | | | | ngpc | SNK Neo Geo Pocket Color | | | | | | odyssey2 | Magnavox Odyssey2 | | | | | | openbor | OpenBOR game engine | | | | | | oric | Tangerine Computer Systems Oric | | | | | | palm | Palm OS | | | | | -| pc | IBM PC | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch), DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | +| pc | IBM PC | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | | pc88 | NEC PC-8800 series | QUASI88 (RetroArch) | | | | | pc98 | NEC PC-9800 series | Neko Project II Kai (RetroArch) | | | | | pcengine | NEC PC Engine | Beetle PCE (RetroArch) | | No | Single archive or ROM file in root folder | @@ -1765,7 +1765,7 @@ Default emulator/Alternative emulators columns: \ | ps4 | Sony PlayStation 4 | | | | | | psp | Sony PlayStation Portable | | | | | | psvita | Sony PlayStation Vita | | | | | -| psx | Sony PlayStation | Beetle PSX (RetroArch) | Beetle PSX HW (RetroArch), PCSX ReARMed (RetroArch), DuckStation (RetroArch) | Yes | .chd file in root folder for single-disc games, .m3u playlist in root folder for multi-disc games | +| psx | Sony PlayStation | Beetle PSX (RetroArch) | Beetle PSX HW (RetroArch)
PCSX ReARMed (RetroArch)
DuckStation (RetroArch) | 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é | | | | | | satellaview | Nintendo Satellaview | | | | | @@ -1777,8 +1777,8 @@ Default emulator/Alternative emulators columns: \ | sega32xna | Sega Genesis 32X [North America] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | | segacd | Sega CD | | | | | | sg-1000 | Sega SG-1000 | | | | | -| snes | Nintendo SNES (Super Nintendo) | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch), bsnes (RetroArch), bsnes-mercury Accuracy (RetroArch), Beetle Supafaust (RetroArch) [UW], Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | -| snesna | Nintendo SNES (Super Nintendo) [North America] | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch), bsnes (RetroArch), bsnes-mercury Accuracy (RetroArch), Beetle Supafaust (RetroArch) [UW], Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | +| snes | Nintendo SNES (Super Nintendo) | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | +| snesna | Nintendo SNES (Super Nintendo) [North America] | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | Single archive or ROM file in root folder | | solarus | Solarus game engine | | | | | | spectravideo | Spectravideo | | | | | | steam | Valve Steam | Steam application | | No | Shell script/batch file in root folder | From 2812b19ab4c2646c2c683eaf44d49c1196de8720 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 22 Sep 2021 21:05:17 +0200 Subject: [PATCH 48/64] Small formatting change to the supported systems table in the user guide. --- USERGUIDE-DEV.md | 284 +++++++++++++++++++++++------------------------ 1 file changed, 142 insertions(+), 142 deletions(-) diff --git a/USERGUIDE-DEV.md b/USERGUIDE-DEV.md index fc0d168c1..a7fabe68b 100644 --- a/USERGUIDE-DEV.md +++ b/USERGUIDE-DEV.md @@ -1648,7 +1648,7 @@ The **Default emulator** column lists the primary emulator as configured in es_s The **Alternative emulators** column lists additional emulators configured in es_systems.xml that can be selected per system and per game, as explained earlier in this guide. In the same manner as the _Default emulator_ column, differences between Unix, macOS and Windows are marked using square brackets. -The **BIOS required** column indicates if additional BIOS/system ROMs are required, as should be explained by the emulator documentation. Good starting points for such documentation are [https://docs.libretro.com](https://docs.libretro.com) and [https://docs.libretro.com/library/bios](https://docs.libretro.com/library/bios) +The **BIOS** column indicates if additional BIOS/system ROMs are required, as should be explained by the emulator documentation. Good starting points for such documentation are [https://docs.libretro.com](https://docs.libretro.com) and [https://docs.libretro.com/library/bios](https://docs.libretro.com/library/bios) For additional details regarding which game file extensions are supported per system, refer to the es_systems.xml files [unix/es_systems.xml](resources/systems/unix/es_systems.xml), [macos/es_systems.xml](resources/systems/macos/es_systems.xml) and [windows/es_systems.xml](resources/systems/windows/es_systems.xml). Normally the extensions setup in these files should cover everything that the emulators support. Note that for systems that have alternative emulators defined, the list of extensions is a combination of what is supported by all the emulators. This approach is necessary as you want to be able to see all games for each system while potentially testing and switching between different emulators, either system-wide or on a per game basis. @@ -1667,144 +1667,144 @@ Consider the table below a work in progress as it's obvioulsy not fully populate Default emulator/Alternative emulators columns: \ **[U]**: Unix, **[M]**: macOS, **[W]**: Windows -| System name | Full name | Default emulator | Alternative emulators | BIOS required | Recommended game setup | -| :-------------------- | :--------------------------------------------- | :-------------------------------- | :-------------------------------- | :------------ | :----------------------------------- | -| 3do | 3DO | | | | | -| 64dd | Nintendo 64DD | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | | | -| ags | Adventure Game Studio game engine | | | | | -| amiga | Commodore Amiga | P-UAE (RetroArch) | | 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 | P-UAE (RetroArch) | | 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 | P-UAE (RetroArch) | | 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 | | | | | -| amstradcpc | Amstrad CPC | | | | | -| apple2 | Apple II | | | | | -| apple2gs | Apple IIGS | | | | | -| arcade | Arcade | MAME - Current (RetroArch) | MAME 2000 (RetroArch)
MAME 2003-Plus (RetroArch)
MAME 2010 (RetroArch) | Depends | Single archive file following MAME name standard in root folder | -| astrocade | Bally Astrocade | | | | | -| atari2600 | Atari 2600 | Stella (RetroArch) | Stella 2014 (RetroArch) | No | Single archive or ROM file in root folder | -| atari5200 | Atari 5200 | | | | | -| atari7800 | Atari 7800 ProSystem | | | | | -| atari800 | Atari 800 | | | | | -| atarijaguar | Atari Jaguar | | | | | -| atarijaguarcd | Atari Jaguar CD | | | | | -| atarilynx | Atari Lynx | | | | | -| atarist | Atari ST [also STE and Falcon] | | | | | -| atarixe | Atari XE | | | | | -| atomiswave | Atomiswave | | | | | -| bbcmicro | BBC Micro | | | | | -| c64 | Commodore 64 | VICE x64sc, accurate (RetroArch) | | No | Single disk, tape or cartridge image in root folder and/or multi-disc images in separate folder | -| cavestory | Cave Story (NXEngine) | | | | | -| cdtv | Commodore CDTV | | | | | -| chailove | ChaiLove game engine | | | | | -| channelf | Fairchild Channel F | | | | | -| coco | Tandy Color Computer | | | | | -| colecovision | ColecoVision | | | | | -| daphne | Daphne Arcade Laserdisc Emulator | | | | | -| desktop | Desktop applications | N/A | | No | | -| doom | Doom | | | | | -| dos | DOS (PC) | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | -| dragon32 | Dragon 32 | | | | | -| dreamcast | Sega Dreamcast | | | | | -| famicom | Nintendo Family Computer | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | -| fba | FinalBurn Alpha | FB Alpha 2012 (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | -| fbneo | FinalBurn Neo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | -| fds | Nintendo Famicom Disk System | Nestopia UE (RetroArch) | | Yes | Single archive or ROM file in root folder | -| gameandwatch | Nintendo Game and Watch | | | | | -| gamegear | Sega Game Gear | | | | | -| gb | Nintendo Game Boy | | | | | -| gba | Nintendo Game Boy Advance | | | | | -| gbc | Nintendo Game Boy Color | | | | | -| gc | Nintendo GameCube | | | | | -| genesis | Sega Genesis | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | -| gx4000 | Amstrad GX4000 | | | | | -| intellivision | Mattel Electronics Intellivision | | | | | -| kodi | Kodi home theatre software | N/A | | No | | -| lutris | Lutris open gaming platform | Lutris application [U] | | No | Shell script in root folder | -| lutro | Lutro game engine | | | | | -| macintosh | Apple Macintosh | | | | | -| mame | Multiple Arcade Machine Emulator | MAME 2003-Plus (RetroArch) | MAME 2000 (RetroArch)
MAME 2010 (RetroArch)
MAME - Current (RetroArch) | 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 (RetroArch) | | No | Single archive or ROM file in root folder | -| megacd | Sega Mega-CD | | | | | -| megacdjp | Sega Mega-CD [Japan] | | | | | -| megadrive | Sega Mega Drive | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | -| mess | Multi Emulator Super System | | | | | -| moonlight | Moonlight game streaming | | | | | -| moto | Thomson MO/TO series | Theodore (RetroArch) | | | | -| msx | MSX | blueMSX (RetroArch) | | | | -| msx1 | MSX1 | blueMSX (RetroArch) | | | | -| msx2 | MSX2 | blueMSX (RetroArch) | | | | -| msxturbor | MSX Turbo R | blueMSX (RetroArch) | | | | -| multivision | Othello Multivision | Gearsystem (RetroArch) | | | | -| naomi | Sega NAOMI | Flycast (RetroArch) | | | | -| naomigd | Sega NAOMI GD-ROM | Flycast (RetroArch) | | | | -| n3ds | Nintendo 3DS | Citra (RetroArch) | | | | -| n64 | Nintendo 64 | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | No | Single archive or ROM file in root folder | -| nds | Nintendo DS | | | | | -| neogeo | SNK Neo Geo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | -| neogeocd | SNK Neo Geo CD | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | -| neogeocdjp | SNK Neo Geo CD [Japan] | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | -| nes | Nintendo Entertainment System | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | -| ngp | SNK Neo Geo Pocket | | | | | -| ngpc | SNK Neo Geo Pocket Color | | | | | -| odyssey2 | Magnavox Odyssey2 | | | | | -| openbor | OpenBOR game engine | | | | | -| oric | Tangerine Computer Systems Oric | | | | | -| palm | Palm OS | | | | | -| pc | IBM PC | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | -| pc88 | NEC PC-8800 series | QUASI88 (RetroArch) | | | | -| pc98 | NEC PC-9800 series | Neko Project II Kai (RetroArch) | | | | -| pcengine | NEC PC Engine | Beetle PCE (RetroArch) | | No | Single archive or ROM file in root folder | -| pcenginecd | NEC PC Engine CD | Beetle PCE (RetroArch) | | Yes | | -| pcfx | NEC PC-FX | | | | | -| pokemini | Nintendo Pokémon Mini | | | No | | -| ports | Ports | N/A | | No | Shell/batch script in separate folder (possibly combined with game data) | -| ps2 | Sony PlayStation 2 | | | | | -| ps3 | Sony PlayStation 3 | | | | | -| ps4 | Sony PlayStation 4 | | | | | -| psp | Sony PlayStation Portable | | | | | -| psvita | Sony PlayStation Vita | | | | | -| psx | Sony PlayStation | Beetle PSX (RetroArch) | Beetle PSX HW (RetroArch)
PCSX ReARMed (RetroArch)
DuckStation (RetroArch) | 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é | | | | | -| satellaview | Nintendo Satellaview | | | | | -| saturn | Sega Saturn | Beetle Saturn (RetroArch) | | | | -| saturnjp | Sega Saturn [Japan] | Beetle Saturn (RetroArch) | | | | -| scummvm | ScummVM game engine | ScummVM (RetroArch) | | No | In separate folder (one folder per game, with complete file structure retained) | -| sega32x | Sega Mega Drive 32X | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | -| sega32xjp | Sega Super 32X [Japan] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | -| sega32xna | Sega Genesis 32X [North America] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | -| segacd | Sega CD | | | | | -| sg-1000 | Sega SG-1000 | | | | | -| snes | Nintendo SNES (Super Nintendo) | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | -| snesna | Nintendo SNES (Super Nintendo) [North America] | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | Single archive or ROM file in root folder | -| solarus | Solarus game engine | | | | | -| spectravideo | Spectravideo | | | | | -| steam | Valve Steam | Steam application | | No | Shell script/batch file in root folder | -| stratagus | Stratagus game engine | | | | | -| sufami | Bandai SuFami Turbo | | | | | -| supergrafx | NEC SuperGrafx | | | | | -| switch | Nintendo Switch | Yuzu [UW] | | Yes | | -| tanodragon | Tano Dragon | | | | | -| tg16 | NEC TurboGrafx-16 | Beetle PCE (RetroArch) | | No | Single archive or ROM file in root folder | -| tg-cd | NEC TurboGrafx-CD | Beetle PCE (RetroArch) | | Yes | | -| ti99 | Texas Instruments TI-99 | | | | | -| tic80 | TIC-80 game engine | | | | | -| to8 | Thomson TO8 | Theodore (RetroArch) | | | | -| trs-80 | Tandy TRS-80 | | | | | -| uzebox | Uzebox | | | | | -| vectrex | Vectrex | | | | | -| videopac | Philips Videopac G7000 (Magnavox Odyssey2) | | | | | -| virtualboy | Nintendo Virtual Boy | | | | | -| wii | Nintendo Wii | | | | | -| wiiu | Nintendo Wii U | | | | | -| wonderswan | Bandai WonderSwan | | | | | -| wonderswancolor | Bandai WonderSwan Color | | | | | -| x1 | Sharp X1 | x1 (RetroArch) | | | Single archive or ROM file in root folder | -| x68000 | Sharp X68000 | | | | | -| xbox | Microsoft Xbox | | | | | -| xbox360 | Microsoft Xbox 360 | | | | | -| zmachine | Infocom Z-machine | | | | | -| zx81 | Sinclair ZX81 | | | | | -| zxspectrum | Sinclair ZX Spectrum | | | | | +| System name | Full name | Default emulator | Alternative emulators | BIOS | Recommended game setup | +| :-------------------- | :--------------------------------------------- | :-------------------------------- | :-------------------------------- | :------ | :----------------------------------- | +| 3do | 3DO | | | | | +| 64dd | Nintendo 64DD | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | | | +| ags | Adventure Game Studio game engine | | | | | +| amiga | Commodore Amiga | P-UAE (RetroArch) | | 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 | P-UAE (RetroArch) | | 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 | P-UAE (RetroArch) | | 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 | | | | | +| amstradcpc | Amstrad CPC | | | | | +| apple2 | Apple II | | | | | +| apple2gs | Apple IIGS | | | | | +| arcade | Arcade | MAME - Current (RetroArch) | MAME 2000 (RetroArch)
MAME 2003-Plus (RetroArch)
MAME 2010 (RetroArch) | Depends | Single archive file following MAME name standard in root folder | +| astrocade | Bally Astrocade | | | | | +| atari2600 | Atari 2600 | Stella (RetroArch) | Stella 2014 (RetroArch) | No | Single archive or ROM file in root folder | +| atari5200 | Atari 5200 | | | | | +| atari7800 | Atari 7800 ProSystem | | | | | +| atari800 | Atari 800 | | | | | +| atarijaguar | Atari Jaguar | | | | | +| atarijaguarcd | Atari Jaguar CD | | | | | +| atarilynx | Atari Lynx | | | | | +| atarist | Atari ST [also STE and Falcon] | | | | | +| atarixe | Atari XE | | | | | +| atomiswave | Atomiswave | | | | | +| bbcmicro | BBC Micro | | | | | +| c64 | Commodore 64 | VICE x64sc, accurate (RetroArch) | | No | Single disk, tape or cartridge image in root folder and/or multi-disc images in separate folder | +| cavestory | Cave Story (NXEngine) | | | | | +| cdtv | Commodore CDTV | | | | | +| chailove | ChaiLove game engine | | | | | +| channelf | Fairchild Channel F | | | | | +| coco | Tandy Color Computer | | | | | +| colecovision | ColecoVision | | | | | +| daphne | Daphne Arcade Laserdisc Emulator | | | | | +| desktop | Desktop applications | N/A | | No | | +| doom | Doom | | | | | +| dos | DOS (PC) | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | +| dragon32 | Dragon 32 | | | | | +| dreamcast | Sega Dreamcast | | | | | +| famicom | Nintendo Family Computer | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | +| fba | FinalBurn Alpha | FB Alpha 2012 (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | +| fbneo | FinalBurn Neo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | +| fds | Nintendo Famicom Disk System | Nestopia UE (RetroArch) | | Yes | Single archive or ROM file in root folder | +| gameandwatch | Nintendo Game and Watch | | | | | +| gamegear | Sega Game Gear | | | | | +| gb | Nintendo Game Boy | | | | | +| gba | Nintendo Game Boy Advance | | | | | +| gbc | Nintendo Game Boy Color | | | | | +| gc | Nintendo GameCube | | | | | +| genesis | Sega Genesis | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | +| gx4000 | Amstrad GX4000 | | | | | +| intellivision | Mattel Electronics Intellivision | | | | | +| kodi | Kodi home theatre software | N/A | | No | | +| lutris | Lutris open gaming platform | Lutris application [U] | | No | Shell script in root folder | +| lutro | Lutro game engine | | | | | +| macintosh | Apple Macintosh | | | | | +| mame | Multiple Arcade Machine Emulator | MAME 2003-Plus (RetroArch) | MAME 2000 (RetroArch)
MAME 2010 (RetroArch)
MAME - Current (RetroArch) | 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 (RetroArch) | | No | Single archive or ROM file in root folder | +| megacd | Sega Mega-CD | | | | | +| megacdjp | Sega Mega-CD [Japan] | | | | | +| megadrive | Sega Mega Drive | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | +| mess | Multi Emulator Super System | | | | | +| moonlight | Moonlight game streaming | | | | | +| moto | Thomson MO/TO series | Theodore (RetroArch) | | | | +| msx | MSX | blueMSX (RetroArch) | | | | +| msx1 | MSX1 | blueMSX (RetroArch) | | | | +| msx2 | MSX2 | blueMSX (RetroArch) | | | | +| msxturbor | MSX Turbo R | blueMSX (RetroArch) | | | | +| multivision | Othello Multivision | Gearsystem (RetroArch) | | | | +| naomi | Sega NAOMI | Flycast (RetroArch) | | | | +| naomigd | Sega NAOMI GD-ROM | Flycast (RetroArch) | | | | +| n3ds | Nintendo 3DS | Citra (RetroArch) | | | | +| n64 | Nintendo 64 | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | No | Single archive or ROM file in root folder | +| nds | Nintendo DS | | | | | +| neogeo | SNK Neo Geo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | +| neogeocd | SNK Neo Geo CD | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | +| neogeocdjp | SNK Neo Geo CD [Japan] | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | +| nes | Nintendo Entertainment System | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | +| ngp | SNK Neo Geo Pocket | | | | | +| ngpc | SNK Neo Geo Pocket Color | | | | | +| odyssey2 | Magnavox Odyssey2 | | | | | +| openbor | OpenBOR game engine | | | | | +| oric | Tangerine Computer Systems Oric | | | | | +| palm | Palm OS | | | | | +| pc | IBM PC | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | +| pc88 | NEC PC-8800 series | QUASI88 (RetroArch) | | | | +| pc98 | NEC PC-9800 series | Neko Project II Kai (RetroArch) | | | | +| pcengine | NEC PC Engine | Beetle PCE (RetroArch) | | No | Single archive or ROM file in root folder | +| pcenginecd | NEC PC Engine CD | Beetle PCE (RetroArch) | | Yes | | +| pcfx | NEC PC-FX | | | | | +| pokemini | Nintendo Pokémon Mini | | | No | | +| ports | Ports | N/A | | No | Shell/batch script in separate folder (possibly combined with game data) | +| ps2 | Sony PlayStation 2 | | | | | +| ps3 | Sony PlayStation 3 | | | | | +| ps4 | Sony PlayStation 4 | | | | | +| psp | Sony PlayStation Portable | | | | | +| psvita | Sony PlayStation Vita | | | | | +| psx | Sony PlayStation | Beetle PSX (RetroArch) | Beetle PSX HW (RetroArch)
PCSX ReARMed (RetroArch)
DuckStation (RetroArch) | 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é | | | | | +| satellaview | Nintendo Satellaview | | | | | +| saturn | Sega Saturn | Beetle Saturn (RetroArch) | | | | +| saturnjp | Sega Saturn [Japan] | Beetle Saturn (RetroArch) | | | | +| scummvm | ScummVM game engine | ScummVM (RetroArch) | | No | In separate folder (one folder per game, with complete file structure retained) | +| sega32x | Sega Mega Drive 32X | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | +| sega32xjp | Sega Super 32X [Japan] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | +| sega32xna | Sega Genesis 32X [North America] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | +| segacd | Sega CD | | | | | +| sg-1000 | Sega SG-1000 | | | | | +| snes | Nintendo SNES (Super Nintendo) | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | +| snesna | Nintendo SNES (Super Nintendo) [North America] | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | +| solarus | Solarus game engine | | | | | +| spectravideo | Spectravideo | | | | | +| steam | Valve Steam | Steam application | | No | Shell script/batch file in root folder | +| stratagus | Stratagus game engine | | | | | +| sufami | Bandai SuFami Turbo | | | | | +| supergrafx | NEC SuperGrafx | | | | | +| switch | Nintendo Switch | Yuzu [UW] | | Yes | | +| tanodragon | Tano Dragon | | | | | +| tg16 | NEC TurboGrafx-16 | Beetle PCE (RetroArch) | | No | Single archive or ROM file in root folder | +| tg-cd | NEC TurboGrafx-CD | Beetle PCE (RetroArch) | | Yes | | +| ti99 | Texas Instruments TI-99 | | | | | +| tic80 | TIC-80 game engine | | | | | +| to8 | Thomson TO8 | Theodore (RetroArch) | | | | +| trs-80 | Tandy TRS-80 | | | | | +| uzebox | Uzebox | | | | | +| vectrex | Vectrex | | | | | +| videopac | Philips Videopac G7000 (Magnavox Odyssey2) | | | | | +| virtualboy | Nintendo Virtual Boy | | | | | +| wii | Nintendo Wii | | | | | +| wiiu | Nintendo Wii U | | | | | +| wonderswan | Bandai WonderSwan | | | | | +| wonderswancolor | Bandai WonderSwan Color | | | | | +| x1 | Sharp X1 | x1 (RetroArch) | | | Single archive or ROM file in root folder | +| x68000 | Sharp X68000 | | | | | +| xbox | Microsoft Xbox | | | | | +| xbox360 | Microsoft Xbox 360 | | | | | +| zmachine | Infocom Z-machine | | | | | +| zx81 | Sinclair ZX81 | | | | | +| zxspectrum | Sinclair ZX Spectrum | | | | | From 46f84ad756659d71f0a24af5332ad2fe7efb4e79 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 22 Sep 2021 23:10:40 +0200 Subject: [PATCH 49/64] Fixed an issue where skipping games would sometimes not work when multi-scraping. --- es-app/src/guis/GuiScraperMulti.cpp | 1 + es-app/src/guis/GuiScraperSearch.cpp | 6 +++--- es-app/src/guis/GuiScraperSearch.h | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/es-app/src/guis/GuiScraperMulti.cpp b/es-app/src/guis/GuiScraperMulti.cpp index d2b07b0ce..067352199 100644 --- a/es-app/src/guis/GuiScraperMulti.cpp +++ b/es-app/src/guis/GuiScraperMulti.cpp @@ -235,6 +235,7 @@ void GuiScraperMulti::skip() mSearchQueue.pop(); mCurrentGame++; mTotalSkipped++; + mSearchComp->decreaseScrapeCount(); mSearchComp->unsetRefinedSearch(); doNextSearch(); } diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index 22ceac3ff..8873aed8d 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -568,7 +568,7 @@ bool GuiScraperSearch::input(InputConfig* config, Input input) } // Skip game, unless the result has already been accepted. - if (!mAcceptedResult && mScrapeCount > 1 && config->isMappedTo("x", input) && input.value != 0) + if (!mAcceptedResult && config->isMappedTo("x", input) && input.value) mSkipCallback(); return GuiComponent::input(config, input); @@ -589,6 +589,7 @@ void GuiScraperSearch::render(const glm::mat4& parentTrans) void GuiScraperSearch::returnResult(ScraperSearchResult result) { + mBlockAccept = true; mAcceptedResult = true; @@ -931,8 +932,7 @@ std::vector GuiScraperSearch::getHelpPrompts() std::vector prompts; prompts.push_back(HelpPrompt("y", "refine search")); - if (mScrapeCount > 1) - prompts.push_back(HelpPrompt("x", "skip")); + prompts.push_back(HelpPrompt("x", "skip")); if (mFoundGame && (mRefinedSearch || mSearchType != ACCEPT_SINGLE_MATCHES || (mSearchType == ACCEPT_SINGLE_MATCHES && mScraperResults.size() > 1))) prompts.push_back(HelpPrompt("a", "accept result")); diff --git a/es-app/src/guis/GuiScraperSearch.h b/es-app/src/guis/GuiScraperSearch.h index cdd86830e..449124ba0 100644 --- a/es-app/src/guis/GuiScraperSearch.h +++ b/es-app/src/guis/GuiScraperSearch.h @@ -69,7 +69,6 @@ public: } void setCancelCallback(const std::function& cancelCallback) { - mScrapeCount -= 1; mCancelCallback = cancelCallback; } @@ -80,6 +79,11 @@ public: HelpStyle getHelpStyle() override; void onSizeChanged() override; + void decreaseScrapeCount() + { + if (mScrapeCount > 0) + mScrapeCount--; + } void unsetRefinedSearch() { mRefinedSearch = false; } bool getRefinedSearch() { return mRefinedSearch; } bool getFoundGame() { return mFoundGame; } From dc18955b28890943ebb15ea8e075537cdd54b1dd Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 22 Sep 2021 23:40:59 +0200 Subject: [PATCH 50/64] Disabled the skip game functionality for the single-game scraper. --- es-app/src/guis/GuiScraperSearch.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index 8873aed8d..d749c1302 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -567,8 +567,9 @@ bool GuiScraperSearch::input(InputConfig* config, Input input) openInputScreen(mLastSearch); } - // Skip game, unless the result has already been accepted. - if (!mAcceptedResult && config->isMappedTo("x", input) && input.value) + // If multi-scraping, skip game unless the result has already been accepted. + if (mSkipCallback != nullptr && !mAcceptedResult && // Line break. + config->isMappedTo("x", input) && input.value) mSkipCallback(); return GuiComponent::input(config, input); @@ -932,7 +933,11 @@ std::vector GuiScraperSearch::getHelpPrompts() std::vector prompts; prompts.push_back(HelpPrompt("y", "refine search")); - prompts.push_back(HelpPrompt("x", "skip")); + + // Only show the skip prompt during multi-scraping. + if (mSkipCallback != nullptr) + prompts.push_back(HelpPrompt("x", "skip")); + if (mFoundGame && (mRefinedSearch || mSearchType != ACCEPT_SINGLE_MATCHES || (mSearchType == ACCEPT_SINGLE_MATCHES && mScraperResults.size() > 1))) prompts.push_back(HelpPrompt("a", "accept result")); From f1ceb1c2fefdd9e6a80eb3a3c2005d42c1e2c2ba Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 22 Sep 2021 23:42:57 +0200 Subject: [PATCH 51/64] Fixed a crash when attempting to navigate multi-cell ComponentGrid entries. --- es-core/src/components/ComponentGrid.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/es-core/src/components/ComponentGrid.cpp b/es-core/src/components/ComponentGrid.cpp index be6f43732..bd6012d12 100644 --- a/es-core/src/components/ComponentGrid.cpp +++ b/es-core/src/components/ComponentGrid.cpp @@ -334,14 +334,16 @@ bool ComponentGrid::moveCursor(glm::ivec2 dir) cursorEntry = getCellAt(mCursor); // Multi-cell entries. - if (dir.x < 0 && cursorEntry->dim.x > 1) - mCursor.x = getCellAt(origCursor)->pos.x - cursorEntry->dim.x; - if (dir.y < 0 && cursorEntry->dim.y > 1) - mCursor.y = getCellAt(origCursor)->pos.y - cursorEntry->dim.y; + if (cursorEntry != nullptr) { + if (dir.x < 0 && cursorEntry->dim.x > 1) + mCursor.x = getCellAt(origCursor)->pos.x - cursorEntry->dim.x; + if (dir.y < 0 && cursorEntry->dim.y > 1) + mCursor.y = getCellAt(origCursor)->pos.y - cursorEntry->dim.y; - if (cursorEntry && cursorEntry->canFocus && cursorEntry != currentCursorEntry) { - onCursorMoved(origCursor, mCursor); - return true; + if (cursorEntry->canFocus && cursorEntry != currentCursorEntry) { + onCursorMoved(origCursor, mCursor); + return true; + } } mCursor += searchAxis; } From 0c3a7d7d94d3a63a5b668725c29e5c51a17165cd Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 17:07:27 +0200 Subject: [PATCH 52/64] Alternative emulators now work correctly when games are launched from collection systems. --- es-app/src/FileData.cpp | 24 ++++++++++++++++++------ es-app/src/SystemData.cpp | 10 ++++++++++ es-app/src/SystemData.h | 1 + 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 6c977dd0f..4b8329203 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -746,14 +746,26 @@ void FileData::launchGame(Window* window) { LOG(LogInfo) << "Launching game \"" << this->metadata.get("name") << "\"..."; + SystemData* gameSystem = nullptr; std::string command = ""; - std::string alternativeEmulator = getSystem()->getAlternativeEmulator(); + std::string alternativeEmulator; + + if (mSystem->isCollection()) + gameSystem = SystemData::getSystemByName(mSystemName); + else + gameSystem = mSystem; + + // This is just a precaution as getSystemByName() should always return a valid result. + if (gameSystem == nullptr) + gameSystem = mSystem; + + alternativeEmulator = gameSystem->getAlternativeEmulator(); // Check if there is a game-specific alternative emulator configured. // This takes precedence over any system-wide alternative emulator configuration. if (Settings::getInstance()->getBool("AlternativeEmulatorPerGame") && !metadata.get("altemulator").empty()) { - command = getSystem()->getLaunchCommandFromLabel(metadata.get("altemulator")); + command = gameSystem->getLaunchCommandFromLabel(metadata.get("altemulator")); if (command == "") { LOG(LogWarning) << "Invalid alternative emulator \"" << metadata.get("altemulator") << "\" configured for game"; @@ -767,16 +779,16 @@ void FileData::launchGame(Window* window) // Check if there is a system-wide alternative emulator configured. if (command == "" && alternativeEmulator != "") { - command = getSystem()->getLaunchCommandFromLabel(alternativeEmulator); + command = gameSystem->getLaunchCommandFromLabel(alternativeEmulator); if (command == "") { LOG(LogWarning) << "Invalid alternative emulator \"" << alternativeEmulator.substr(9, alternativeEmulator.length() - 9) - << "\" configured for system \"" << getSystem()->getName() << "\""; + << "\" configured for system \"" << gameSystem->getName() << "\""; } else { LOG(LogDebug) << "FileData::launchGame(): Using alternative emulator \"" - << getSystem()->getAlternativeEmulator() << "\"" - << " as configured for system \"" << this->getSystem()->getName() << "\""; + << gameSystem->getAlternativeEmulator() << "\"" + << " as configured for system \"" << gameSystem->getName() << "\""; } } diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 9c565c0d2..adaa2c9b6 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -969,6 +969,16 @@ bool SystemData::isVisible() return true; } +SystemData* SystemData::getSystemByName(const std::string& systemName) +{ + for (auto it : sSystemVector) { + if ((*it).getName() == systemName) + return it; + } + + return nullptr; +} + SystemData* SystemData::getNext() const { std::vector::const_iterator it = getIterator(); diff --git a/es-app/src/SystemData.h b/es-app/src/SystemData.h index 381dd4380..8dd7bd4fd 100644 --- a/es-app/src/SystemData.h +++ b/es-app/src/SystemData.h @@ -131,6 +131,7 @@ public: bool isVisible(); + static SystemData* getSystemByName(const std::string& systemName); SystemData* getNext() const; SystemData* getPrev() const; static SystemData* getRandomSystem(const SystemData* currentSystem); From ed7843e89851fbf5e94e2df7eff7c9c759252925 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 17:11:49 +0200 Subject: [PATCH 53/64] Fixed an issue where brackets were removed from game names in collection system views. --- es-app/src/FileData.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 4b8329203..8b441da80 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -1353,10 +1353,10 @@ void CollectionFileData::refreshMetadata() const std::string& CollectionFileData::getName() { if (mDirty) { - mCollectionFileName = - Utils::String::removeParenthesis(mSourceFileData->metadata.get("name")); - mCollectionFileName += - " [" + Utils::String::toUpper(mSourceFileData->getSystem()->getName()) + "]"; + mCollectionFileName = mSourceFileData->metadata.get("name"); + mCollectionFileName.append(" [") + .append(Utils::String::toUpper(mSourceFileData->getSystem()->getName())) + .append("]"); mDirty = false; } From 8f02bdf74f7cbd358b660adcfdcee7e4ae7631a6 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 17:14:43 +0200 Subject: [PATCH 54/64] Added a keyboard symbol/character. --- es-app/src/views/ViewController.cpp | 2 ++ es-app/src/views/ViewController.h | 1 + 2 files changed, 3 insertions(+) diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 74977005a..21e5c355d 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -45,6 +45,7 @@ const std::string ViewController::FAVORITE_CHAR = Utils::String::wideStringToStr const std::string ViewController::FILTER_CHAR = Utils::String::wideStringToString(L"\uf0b0"); const std::string ViewController::FOLDER_CHAR = Utils::String::wideStringToString(L"\uf07C"); const std::string ViewController::GEAR_CHAR = Utils::String::wideStringToString(L"\uf013"); +const std::string ViewController::KEYBOARD_CHAR = Utils::String::wideStringToString(L"\uf11c"); const std::string ViewController::TICKMARK_CHAR = Utils::String::wideStringToString(L"\uf14A"); #else const std::string ViewController::CONTROLLER_CHAR = "\uf11b"; @@ -54,6 +55,7 @@ const std::string ViewController::FAVORITE_CHAR = "\uf005"; const std::string ViewController::FILTER_CHAR = "\uf0b0"; const std::string ViewController::FOLDER_CHAR = "\uf07C"; const std::string ViewController::GEAR_CHAR = "\uf013"; +const std::string ViewController::KEYBOARD_CHAR = "\uf11c"; const std::string ViewController::TICKMARK_CHAR = "\uf14a"; #endif diff --git a/es-app/src/views/ViewController.h b/es-app/src/views/ViewController.h index a3898e377..d2ea58c57 100644 --- a/es-app/src/views/ViewController.h +++ b/es-app/src/views/ViewController.h @@ -130,6 +130,7 @@ public: static const std::string FILTER_CHAR; static const std::string FOLDER_CHAR; static const std::string GEAR_CHAR; + static const std::string KEYBOARD_CHAR; static const std::string TICKMARK_CHAR; private: From afe8128cc7f892561f039af2ae976974d6552e37 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 17:16:47 +0200 Subject: [PATCH 55/64] Changed the filter 'Text filter (game name)' to a keyboard symbol followed by 'Game name'. --- es-app/src/guis/GuiGamelistFilter.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/es-app/src/guis/GuiGamelistFilter.cpp b/es-app/src/guis/GuiGamelistFilter.cpp index ee6746ef0..0f346866b 100644 --- a/es-app/src/guis/GuiGamelistFilter.cpp +++ b/es-app/src/guis/GuiGamelistFilter.cpp @@ -89,9 +89,9 @@ void GuiGamelistFilter::addFiltersToMenu() { ComponentListRow row; - auto lbl = - std::make_shared(mWindow, Utils::String::toUpper("TEXT FILTER (GAME NAME)"), - Font::get(FONT_SIZE_MEDIUM), 0x777777FF); + auto lbl = std::make_shared( + mWindow, Utils::String::toUpper(ViewController::KEYBOARD_CHAR + " GAME NAME"), + Font::get(FONT_SIZE_MEDIUM), 0x777777FF); mTextFilterField = std::make_shared(mWindow, "", Font::get(FONT_SIZE_MEDIUM), 0x777777FF, ALIGN_RIGHT); @@ -121,16 +121,16 @@ void GuiGamelistFilter::addFiltersToMenu() if (Settings::getInstance()->getBool("VirtualKeyboard")) { row.makeAcceptInputHandler([this, updateVal] { - mWindow->pushGui(new GuiTextEditKeyboardPopup( - mWindow, getHelpStyle(), "TEXT FILTER (GAME NAME)", mTextFilterField->getValue(), - updateVal, false, "OK", "APPLY CHANGES?")); + mWindow->pushGui(new GuiTextEditKeyboardPopup(mWindow, getHelpStyle(), "GAME NAME", + mTextFilterField->getValue(), updateVal, + false, "OK", "APPLY CHANGES?")); }); } else { row.makeAcceptInputHandler([this, updateVal] { - mWindow->pushGui(new GuiTextEditPopup( - mWindow, getHelpStyle(), "TEXT FILTER (GAME NAME)", mTextFilterField->getValue(), - updateVal, false, "OK", "APPLY CHANGES?")); + mWindow->pushGui(new GuiTextEditPopup(mWindow, getHelpStyle(), "GAME NAME", + mTextFilterField->getValue(), updateVal, false, + "OK", "APPLY CHANGES?")); }); } From 61dbe3cba9df6b18a176836a897719e5976e6c3f Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 17:42:04 +0200 Subject: [PATCH 56/64] Fixed an issue where system names were included in game name searches done in collection systems. --- es-app/src/FileFilterIndex.cpp | 20 ++++++++++++++------ es-app/src/FileFilterIndex.h | 2 ++ es-app/src/guis/GuiGamelistFilter.cpp | 9 +++++++++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/es-app/src/FileFilterIndex.cpp b/es-app/src/FileFilterIndex.cpp index b4cb21de3..75daf387f 100644 --- a/es-app/src/FileFilterIndex.cpp +++ b/es-app/src/FileFilterIndex.cpp @@ -21,6 +21,7 @@ FileFilterIndex::FileFilterIndex() : mFilterByText(false) + , mTextRemoveSystem(false) , mFilterByFavorites(false) , mFilterByGenre(false) , mFilterByPlayers(false) @@ -35,7 +36,7 @@ FileFilterIndex::FileFilterIndex() // clang-format off FilterDataDecl filterDecls[] = { - //type //allKeys //filteredBy //filteredKeys //primaryKey //hasSecondaryKey //secondaryKey //menuLabel + //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"}, @@ -359,15 +360,22 @@ bool FileFilterIndex::showFile(FileData* game) bool keepGoing = false; // Name filters take precedence over all other filters, so if there is no match for - // the game name, then always return false. - if (mTextFilter != "" && - !(Utils::String::toUpper(game->getName()).find(mTextFilter) != std::string::npos)) { + // the game name, then always return false. If we're in a collection system and the option + // to show the system name has been enabled, then exclude the system name that is encapsulated + // in [] from the search string. + if (mTextFilter != "" && mTextRemoveSystem && + !(Utils::String::toUpper(game->getName().substr(0, game->getName().find_last_of("["))) + .find(mTextFilter) != std::string::npos)) { return false; } - else if (mTextFilter != "") { - nameMatch = true; + else if (mTextFilter != "" && + !(Utils::String::toUpper(game->getName()).find(mTextFilter) != std::string::npos)) { + return false; } + if (mTextFilter != "") + nameMatch = true; + for (std::vector::const_iterator it = filterDataDecl.cbegin(); it != filterDataDecl.cend(); it++) { FilterDataDecl filterData = (*it); diff --git a/es-app/src/FileFilterIndex.h b/es-app/src/FileFilterIndex.h index 4c68b25d1..18cbf4469 100644 --- a/es-app/src/FileFilterIndex.h +++ b/es-app/src/FileFilterIndex.h @@ -59,6 +59,7 @@ public: bool isFiltered(); bool isKeyBeingFilteredBy(std::string key, FilterIndexType type); std::vector& getFilterDataDecls() { return filterDataDecl; } + void setTextRemoveSystem(bool status) { mTextRemoveSystem = status; } void importIndex(FileFilterIndex* indexToImport); void resetIndex(); @@ -85,6 +86,7 @@ private: std::string mTextFilter; bool mFilterByText; + bool mTextRemoveSystem; bool mFilterByFavorites; bool mFilterByGenre; diff --git a/es-app/src/guis/GuiGamelistFilter.cpp b/es-app/src/guis/GuiGamelistFilter.cpp index 0f346866b..679e785cb 100644 --- a/es-app/src/guis/GuiGamelistFilter.cpp +++ b/es-app/src/guis/GuiGamelistFilter.cpp @@ -36,6 +36,15 @@ void GuiGamelistFilter::initializeMenu() // Get filters from system. mFilterIndex = mSystem->getIndex(); + // If this is a collection and system names are shown per game, then let FileFilterIndex + // know about this so the system names will not be included in game name text searches. + if (ViewController::get()->getState().getSystem()->isCollection()) { + if (Settings::getInstance()->getBool("CollectionShowSystemInfo")) + mFilterIndex->setTextRemoveSystem(true); + else + mFilterIndex->setTextRemoveSystem(false); + } + ComponentListRow row; // Show filtered menu. From 1d078798681dc4ce636cb87801d7ad66dc07e58c Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 17:49:59 +0200 Subject: [PATCH 57/64] Fixed a compiler warning. --- es-core/src/utils/FileSystemUtil.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp index 4ff05ba45..48b686b30 100644 --- a/es-core/src/utils/FileSystemUtil.cpp +++ b/es-core/src/utils/FileSystemUtil.cpp @@ -8,8 +8,6 @@ // remove files etc. // -#define _FILE_OFFSET_BITS 64 - #if defined(__APPLE__) #define _DARWIN_USE_64_BIT_INODE #endif From be62e8fc5deedf4f105416e925bdc1cfdb6e7d80 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 17:54:27 +0200 Subject: [PATCH 58/64] Proper fix for the last commit. --- es-core/src/utils/FileSystemUtil.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp index 48b686b30..c96ae9b4f 100644 --- a/es-core/src/utils/FileSystemUtil.cpp +++ b/es-core/src/utils/FileSystemUtil.cpp @@ -8,6 +8,10 @@ // remove files etc. // +#if !defined(__APPLE__) +#define _FILE_OFFSET_BITS 64 +#endif + #if defined(__APPLE__) #define _DARWIN_USE_64_BIT_INODE #endif From ecc8191fda53165f39b4da54d79b1da863c24931 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 18:31:05 +0200 Subject: [PATCH 59/64] Added alternative emulators to the c64, arcade, mame, pcengine, pcenginecd, tg16 and tg-cd systems. --- resources/systems/macos/es_systems.xml | 39 +++++++++++++++--------- resources/systems/unix/es_systems.xml | 36 ++++++++++++++-------- resources/systems/windows/es_systems.xml | 36 ++++++++++++++-------- 3 files changed, 73 insertions(+), 38 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index 3835bd6f6..6c7af165f 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -100,6 +100,8 @@ %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.dylib %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.dylib %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.dylib %ROM% arcade arcade @@ -216,8 +218,12 @@ c64 Commodore 64 %ROMPATH%/c64 - .d64 .D64 .d71 .D71 .d80 .D80 .d81 .D81 .d82 .D82 .g64 .G64 .g41 .G41 .x64 .X64 .t64 .T64 .tap .TAP .prg .PRG .p00 .P00 .crt .CRT .bin .BIN .gz .GZ .d6z .D6Z .d7z .D7Z .d8z .D8Z .g6z .G6Z .x6z .X6Z .cmd .CMD .m3u .M3U .vsf .VSF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64sc_libretro.dylib %ROM% + .bin .BIN .cmd .CMD .crt .CRT .d2m .D2M .d4m .D4M .d64 .D64 .d6z .D6Z .d71 .D71 .d7z .D7Z .d80 .D80 .d81 .D81 .d82 .D82 .d8z .D8Z .g41 .G41 .g4z .G4Z .g64 .G64 .g6z .G6Z .gz .GZ .lnx .LNX .m3u .M3U .nbz .NBZ .nib .NIB .p00 .P00 .prg .PRG .t64 .T64 .tap .TAP .vfl .VFL .vsf .VSF .x64 .X64 .x6z .X6Z .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64sc_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_xscpu64_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x128_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/frodo_libretro.dylib %ROM% c64 c64 @@ -494,11 +500,13 @@ mame Multiple Arcade Machine Emulator %ROMPATH%/mame - .zip .ZIP .7z .7Z + .cmd .CMD .7z .7Z .zip .ZIP %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.dylib %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.dylib %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.dylib %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.dylib %ROM% arcade mame @@ -802,8 +810,9 @@ pcengine NEC PC Engine %ROMPATH%/pcengine - .pce .PCE .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% pcengine pcengine @@ -811,8 +820,9 @@ pcenginecd NEC PC Engine CD %ROMPATH%/pcenginecd - .pce .PCE .cue .CUE .ccd .CCD .iso .ISO .img .IMG .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% pcenginecd pcenginecd @@ -847,8 +857,8 @@ ps2 Sony PlayStation 2 %ROMPATH%/ps2 - .iso .ISO .isz .ISZ .cso .CSO .bin .BIN .elf .ELF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/play_libretro.dylib %ROM% + .7z .7Z .zip .ZIP + PLACEHOLDER %ROM% ps2 ps2 @@ -1101,8 +1111,9 @@ tg16 NEC TurboGrafx-16 %ROMPATH%/tg16 - .pce .PCE .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% pcengine tg16 @@ -1110,9 +1121,9 @@ tg-cd NEC TurboGrafx-CD %ROMPATH%/tg-cd - .pce .PCE .cue .CUE .ccd .CCD .iso .ISO .img .IMG .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% - pcenginecd + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% tg-cd diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index 2bafbc3b5..5689a086f 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -101,6 +101,8 @@ %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.so %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.so %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.so %ROM% arcade arcade @@ -217,8 +219,12 @@ c64 Commodore 64 %ROMPATH%/c64 - .d64 .D64 .d71 .D71 .d80 .D80 .d81 .D81 .d82 .D82 .g64 .G64 .g41 .G41 .x64 .X64 .t64 .T64 .tap .TAP .prg .PRG .p00 .P00 .crt .CRT .bin .BIN .gz .GZ .d6z .D6Z .d7z .D7Z .d8z .D8Z .g6z .G6Z .x6z .X6Z .cmd .CMD .m3u .M3U .vsf .VSF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64sc_libretro.so %ROM% + .bin .BIN .cmd .CMD .crt .CRT .d2m .D2M .d4m .D4M .d64 .D64 .d6z .D6Z .d71 .D71 .d7z .D7Z .d80 .D80 .d81 .D81 .d82 .D82 .d8z .D8Z .g41 .G41 .g4z .G4Z .g64 .G64 .g6z .G6Z .gz .GZ .lnx .LNX .m3u .M3U .nbz .NBZ .nib .NIB .p00 .P00 .prg .PRG .t64 .T64 .tap .TAP .vfl .VFL .vsf .VSF .x64 .X64 .x6z .X6Z .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64sc_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_xscpu64_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x128_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/frodo_libretro.so %ROM% c64 c64 @@ -495,11 +501,13 @@ mame Multiple Arcade Machine Emulator %ROMPATH%/mame - .zip .ZIP .7z .7Z + .cmd .CMD .7z .7Z .zip .ZIP %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.so %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.so %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.so %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.so %ROM% arcade mame @@ -804,8 +812,9 @@ pcengine NEC PC Engine %ROMPATH%/pcengine - .pce .PCE .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% pcengine pcengine @@ -813,8 +822,9 @@ pcenginecd NEC PC Engine CD %ROMPATH%/pcenginecd - .pce .PCE .cue .CUE .ccd .CCD .iso .ISO .img .IMG .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% pcenginecd pcenginecd @@ -850,7 +860,7 @@ Sony PlayStation 2 %ROMPATH%/ps2 .iso .ISO .isz .ISZ .cso .CSO .bin .BIN .elf .ELF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/play_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/pcsx2_libretro.so %ROM% ps2 ps2 @@ -1105,8 +1115,9 @@ tg16 NEC TurboGrafx-16 %ROMPATH%/tg16 - .pce .PCE .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% pcengine tg16 @@ -1114,8 +1125,9 @@ tg-cd NEC TurboGrafx-CD %ROMPATH%/tg-cd - .pce .PCE .cue .CUE .ccd .CCD .iso .ISO .img .IMG .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% pcenginecd tg-cd diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 01b067026..1fe8f834d 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -101,6 +101,8 @@ %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2000_libretro.dll %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2003_plus_libretro.dll %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2010_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbneo_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_libretro.dll %ROM% arcade arcade @@ -217,8 +219,12 @@ c64 Commodore 64 %ROMPATH%\c64 - .d64 .D64 .d71 .D71 .d80 .D80 .d81 .D81 .d82 .D82 .g64 .G64 .g41 .G41 .x64 .X64 .t64 .T64 .tap .TAP .prg .PRG .p00 .P00 .crt .CRT .bin .BIN .gz .GZ .d6z .D6Z .d7z .D7Z .d8z .D8Z .g6z .G6Z .x6z .X6Z .cmd .CMD .m3u .M3U .vsf .VSF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x64sc_libretro.dll %ROM% + .bin .BIN .cmd .CMD .crt .CRT .d2m .D2M .d4m .D4M .d64 .D64 .d6z .D6Z .d71 .D71 .d7z .D7Z .d80 .D80 .d81 .D81 .d82 .D82 .d8z .D8Z .g41 .G41 .g4z .G4Z .g64 .G64 .g6z .G6Z .gz .GZ .lnx .LNX .m3u .M3U .nbz .NBZ .nib .NIB .p00 .P00 .prg .PRG .t64 .T64 .tap .TAP .vfl .VFL .vsf .VSF .x64 .X64 .x6z .X6Z .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x64sc_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x64_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_xscpu64_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x128_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\frodo_libretro.dll %ROM% c64 c64 @@ -495,11 +501,13 @@ mame Multiple Arcade Machine Emulator %ROMPATH%\mame - .zip .ZIP .7z .7Z + .cmd .CMD .7z .7Z .zip .ZIP %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2003_plus_libretro.dll %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2000_libretro.dll %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2010_libretro.dll %ROM% %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbneo_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_libretro.dll %ROM% arcade mame @@ -804,8 +812,9 @@ pcengine NEC PC Engine %ROMPATH%\pcengine - .pce .PCE .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% pcengine pcengine @@ -813,8 +822,9 @@ pcenginecd NEC PC Engine CD %ROMPATH%\pcenginecd - .pce .PCE .cue .CUE .ccd .CCD .iso .ISO .img .IMG .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% pcenginecd pcenginecd @@ -850,7 +860,7 @@ Sony PlayStation 2 %ROMPATH%\ps2 .iso .ISO .isz .ISZ .cso .CSO .bin .BIN .elf .ELF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\play_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\pcsx2_libretro.dll %ROM% ps2 ps2 @@ -1105,8 +1115,9 @@ tg16 NEC TurboGrafx-16 %ROMPATH%\tg16 - .pce .PCE .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% pcengine tg16 @@ -1114,8 +1125,9 @@ tg-cd NEC TurboGrafx-CD %ROMPATH%\tg-cd - .pce .PCE .cue .CUE .ccd .CCD .iso .ISO .img .IMG .bin .BIN .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% pcenginecd tg-cd From 6a771e04fb11b10197bbf4555818e0d7eea64a39 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 18:33:17 +0200 Subject: [PATCH 60/64] Documentation update. --- CHANGELOG.md | 6 +- USERGUIDE-DEV.md | 292 +++++++++++++++++++++++------------------------ 2 files changed, 151 insertions(+), 147 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47490f339..5557eb114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ * Moved the Media Viewer and Screensaver settings higher in the UI Settings menu * 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 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 @@ -40,11 +41,14 @@ ### Bug fixes * When multi-scraping in interactive mode with "Auto-accept single game matches" enabled, the game name could not be refined if there were no games found -* 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 +* 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 * 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 +* Game name (text) filters were matching the system names for collection systems if the "Show system names in collections" setting was enabled +* Brackets such as () and [] were filtered from game names in collection systems if the "Show system names in collections" setting was enabled * When navigating menus, the separator lines and menu components did not align properly and moved up and down slightly * When scrolling in menus, pressing other buttons than "Up" or "Down" did not stop the scrolling which caused all sorts of weird behavior * With the menu scale-up effect enabled and entering a submenu before the parent menu was completely scaled up, the parent would get stuck at a semi-scaled size diff --git a/USERGUIDE-DEV.md b/USERGUIDE-DEV.md index a7fabe68b..adc48ec9d 100644 --- a/USERGUIDE-DEV.md +++ b/USERGUIDE-DEV.md @@ -1330,7 +1330,7 @@ _The gamelist filter screen, accessed from the game options menu._ The following filters can be applied: -**Text Filter (game name)** +**Game name** **Favorites** @@ -1350,9 +1350,9 @@ The following filters can be applied: **Hidden** -With the exception of the 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 for instance are no games marked as completed, the Completed filter will only have the selectable option False, i.e. True will be missing. -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 text/game name 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. +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. The filters are always applied for the complete game system, including all folder content. @@ -1646,9 +1646,9 @@ For the **Full name** column, text inside square brackets [] are comments and no The **Default emulator** column lists the primary emulator as configured in es_systems.xml. If this differs between Unix, macOS and Windows that is specified in square brackets, such as [UW] for Unix and Windows and [M] for macOS. If not all of the three platforms are specified it means that the system is not available on those platforms. For example Lutris which is only avaialable on Unix is marked as _Lutris application [U]_. -The **Alternative emulators** column lists additional emulators configured in es_systems.xml that can be selected per system and per game, as explained earlier in this guide. In the same manner as the _Default emulator_ column, differences between Unix, macOS and Windows are marked using square brackets. +The **Alternative emulators** column lists additional emulators configured in es_systems.xml that can be selected per system and per game, as explained earlier in this guide. This does not necessarily include everything in existence, as for some platforms there are a lot of emulators to choose from. In those cases the included emulators is a curated selection. In the same manner as the _Default emulator_ column, differences between Unix, macOS and Windows are marked using square brackets. -The **BIOS** column indicates if additional BIOS/system ROMs are required, as should be explained by the emulator documentation. Good starting points for such documentation are [https://docs.libretro.com](https://docs.libretro.com) and [https://docs.libretro.com/library/bios](https://docs.libretro.com/library/bios) +The **Needs BIOS** column indicates if additional BIOS/system ROMs are required, as should be explained by the emulator documentation. Good starting points for such documentation are [https://docs.libretro.com](https://docs.libretro.com) and [https://docs.libretro.com/library/bios](https://docs.libretro.com/library/bios) For additional details regarding which game file extensions are supported per system, refer to the es_systems.xml files [unix/es_systems.xml](resources/systems/unix/es_systems.xml), [macos/es_systems.xml](resources/systems/macos/es_systems.xml) and [windows/es_systems.xml](resources/systems/windows/es_systems.xml). Normally the extensions setup in these files should cover everything that the emulators support. Note that for systems that have alternative emulators defined, the list of extensions is a combination of what is supported by all the emulators. This approach is necessary as you want to be able to see all games for each system while potentially testing and switching between different emulators, either system-wide or on a per game basis. @@ -1667,144 +1667,144 @@ Consider the table below a work in progress as it's obvioulsy not fully populate Default emulator/Alternative emulators columns: \ **[U]**: Unix, **[M]**: macOS, **[W]**: Windows -| System name | Full name | Default emulator | Alternative emulators | BIOS | Recommended game setup | -| :-------------------- | :--------------------------------------------- | :-------------------------------- | :-------------------------------- | :------ | :----------------------------------- | -| 3do | 3DO | | | | | -| 64dd | Nintendo 64DD | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | | | -| ags | Adventure Game Studio game engine | | | | | -| amiga | Commodore Amiga | P-UAE (RetroArch) | | 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 | P-UAE (RetroArch) | | 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 | P-UAE (RetroArch) | | 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 | | | | | -| amstradcpc | Amstrad CPC | | | | | -| apple2 | Apple II | | | | | -| apple2gs | Apple IIGS | | | | | -| arcade | Arcade | MAME - Current (RetroArch) | MAME 2000 (RetroArch)
MAME 2003-Plus (RetroArch)
MAME 2010 (RetroArch) | Depends | Single archive file following MAME name standard in root folder | -| astrocade | Bally Astrocade | | | | | -| atari2600 | Atari 2600 | Stella (RetroArch) | Stella 2014 (RetroArch) | No | Single archive or ROM file in root folder | -| atari5200 | Atari 5200 | | | | | -| atari7800 | Atari 7800 ProSystem | | | | | -| atari800 | Atari 800 | | | | | -| atarijaguar | Atari Jaguar | | | | | -| atarijaguarcd | Atari Jaguar CD | | | | | -| atarilynx | Atari Lynx | | | | | -| atarist | Atari ST [also STE and Falcon] | | | | | -| atarixe | Atari XE | | | | | -| atomiswave | Atomiswave | | | | | -| bbcmicro | BBC Micro | | | | | -| c64 | Commodore 64 | VICE x64sc, accurate (RetroArch) | | No | Single disk, tape or cartridge image in root folder and/or multi-disc images in separate folder | -| cavestory | Cave Story (NXEngine) | | | | | -| cdtv | Commodore CDTV | | | | | -| chailove | ChaiLove game engine | | | | | -| channelf | Fairchild Channel F | | | | | -| coco | Tandy Color Computer | | | | | -| colecovision | ColecoVision | | | | | -| daphne | Daphne Arcade Laserdisc Emulator | | | | | -| desktop | Desktop applications | N/A | | No | | -| doom | Doom | | | | | -| dos | DOS (PC) | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | -| dragon32 | Dragon 32 | | | | | -| dreamcast | Sega Dreamcast | | | | | -| famicom | Nintendo Family Computer | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | -| fba | FinalBurn Alpha | FB Alpha 2012 (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | -| fbneo | FinalBurn Neo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | -| fds | Nintendo Famicom Disk System | Nestopia UE (RetroArch) | | Yes | Single archive or ROM file in root folder | -| gameandwatch | Nintendo Game and Watch | | | | | -| gamegear | Sega Game Gear | | | | | -| gb | Nintendo Game Boy | | | | | -| gba | Nintendo Game Boy Advance | | | | | -| gbc | Nintendo Game Boy Color | | | | | -| gc | Nintendo GameCube | | | | | -| genesis | Sega Genesis | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | -| gx4000 | Amstrad GX4000 | | | | | -| intellivision | Mattel Electronics Intellivision | | | | | -| kodi | Kodi home theatre software | N/A | | No | | -| lutris | Lutris open gaming platform | Lutris application [U] | | No | Shell script in root folder | -| lutro | Lutro game engine | | | | | -| macintosh | Apple Macintosh | | | | | -| mame | Multiple Arcade Machine Emulator | MAME 2003-Plus (RetroArch) | MAME 2000 (RetroArch)
MAME 2010 (RetroArch)
MAME - Current (RetroArch) | 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 (RetroArch) | | No | Single archive or ROM file in root folder | -| megacd | Sega Mega-CD | | | | | -| megacdjp | Sega Mega-CD [Japan] | | | | | -| megadrive | Sega Mega Drive | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | -| mess | Multi Emulator Super System | | | | | -| moonlight | Moonlight game streaming | | | | | -| moto | Thomson MO/TO series | Theodore (RetroArch) | | | | -| msx | MSX | blueMSX (RetroArch) | | | | -| msx1 | MSX1 | blueMSX (RetroArch) | | | | -| msx2 | MSX2 | blueMSX (RetroArch) | | | | -| msxturbor | MSX Turbo R | blueMSX (RetroArch) | | | | -| multivision | Othello Multivision | Gearsystem (RetroArch) | | | | -| naomi | Sega NAOMI | Flycast (RetroArch) | | | | -| naomigd | Sega NAOMI GD-ROM | Flycast (RetroArch) | | | | -| n3ds | Nintendo 3DS | Citra (RetroArch) | | | | -| n64 | Nintendo 64 | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | No | Single archive or ROM file in root folder | -| nds | Nintendo DS | | | | | -| neogeo | SNK Neo Geo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | -| neogeocd | SNK Neo Geo CD | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | -| neogeocdjp | SNK Neo Geo CD [Japan] | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | -| nes | Nintendo Entertainment System | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | -| ngp | SNK Neo Geo Pocket | | | | | -| ngpc | SNK Neo Geo Pocket Color | | | | | -| odyssey2 | Magnavox Odyssey2 | | | | | -| openbor | OpenBOR game engine | | | | | -| oric | Tangerine Computer Systems Oric | | | | | -| palm | Palm OS | | | | | -| pc | IBM PC | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | -| pc88 | NEC PC-8800 series | QUASI88 (RetroArch) | | | | -| pc98 | NEC PC-9800 series | Neko Project II Kai (RetroArch) | | | | -| pcengine | NEC PC Engine | Beetle PCE (RetroArch) | | No | Single archive or ROM file in root folder | -| pcenginecd | NEC PC Engine CD | Beetle PCE (RetroArch) | | Yes | | -| pcfx | NEC PC-FX | | | | | -| pokemini | Nintendo Pokémon Mini | | | No | | -| ports | Ports | N/A | | No | Shell/batch script in separate folder (possibly combined with game data) | -| ps2 | Sony PlayStation 2 | | | | | -| ps3 | Sony PlayStation 3 | | | | | -| ps4 | Sony PlayStation 4 | | | | | -| psp | Sony PlayStation Portable | | | | | -| psvita | Sony PlayStation Vita | | | | | -| psx | Sony PlayStation | Beetle PSX (RetroArch) | Beetle PSX HW (RetroArch)
PCSX ReARMed (RetroArch)
DuckStation (RetroArch) | 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é | | | | | -| satellaview | Nintendo Satellaview | | | | | -| saturn | Sega Saturn | Beetle Saturn (RetroArch) | | | | -| saturnjp | Sega Saturn [Japan] | Beetle Saturn (RetroArch) | | | | -| scummvm | ScummVM game engine | ScummVM (RetroArch) | | No | In separate folder (one folder per game, with complete file structure retained) | -| sega32x | Sega Mega Drive 32X | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | -| sega32xjp | Sega Super 32X [Japan] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | -| sega32xna | Sega Genesis 32X [North America] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | -| segacd | Sega CD | | | | | -| sg-1000 | Sega SG-1000 | | | | | -| snes | Nintendo SNES (Super Nintendo) | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | -| snesna | Nintendo SNES (Super Nintendo) [North America] | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | -| solarus | Solarus game engine | | | | | -| spectravideo | Spectravideo | | | | | -| steam | Valve Steam | Steam application | | No | Shell script/batch file in root folder | -| stratagus | Stratagus game engine | | | | | -| sufami | Bandai SuFami Turbo | | | | | -| supergrafx | NEC SuperGrafx | | | | | -| switch | Nintendo Switch | Yuzu [UW] | | Yes | | -| tanodragon | Tano Dragon | | | | | -| tg16 | NEC TurboGrafx-16 | Beetle PCE (RetroArch) | | No | Single archive or ROM file in root folder | -| tg-cd | NEC TurboGrafx-CD | Beetle PCE (RetroArch) | | Yes | | -| ti99 | Texas Instruments TI-99 | | | | | -| tic80 | TIC-80 game engine | | | | | -| to8 | Thomson TO8 | Theodore (RetroArch) | | | | -| trs-80 | Tandy TRS-80 | | | | | -| uzebox | Uzebox | | | | | -| vectrex | Vectrex | | | | | -| videopac | Philips Videopac G7000 (Magnavox Odyssey2) | | | | | -| virtualboy | Nintendo Virtual Boy | | | | | -| wii | Nintendo Wii | | | | | -| wiiu | Nintendo Wii U | | | | | -| wonderswan | Bandai WonderSwan | | | | | -| wonderswancolor | Bandai WonderSwan Color | | | | | -| x1 | Sharp X1 | x1 (RetroArch) | | | Single archive or ROM file in root folder | -| x68000 | Sharp X68000 | | | | | -| xbox | Microsoft Xbox | | | | | -| xbox360 | Microsoft Xbox 360 | | | | | -| zmachine | Infocom Z-machine | | | | | -| zx81 | Sinclair ZX81 | | | | | -| zxspectrum | Sinclair ZX Spectrum | | | | | +| System name | Full name | Default emulator | Alternative emulators | Needs BIOS | Recommended game setup | +| :-------------------- | :--------------------------------------------- | :-------------------------------- | :-------------------------------- | :----------- | :----------------------------------- | +| 3do | 3DO | 4DO (RetroArch) | | | | +| 64dd | Nintendo 64DD | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | | | +| ags | Adventure Game Studio game engine | | | | | +| amiga | Commodore Amiga | PUAE (RetroArch) | | 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 (RetroArch) | | 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 (RetroArch) | | 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 (RetroArch) | | | | +| amstradcpc | Amstrad CPC | Caprice32 (RetroArch) | | | | +| apple2 | Apple II | | | | | +| apple2gs | Apple IIGS | | | | | +| arcade | Arcade | MAME - Current (RetroArch) | MAME 2000 (RetroArch)
MAME 2003-Plus (RetroArch)
MAME 2010 (RetroArch)
FinalBurn Neo (RetroArch)
FB Alpha 2012 (RetroArch) | Depends | Single archive file following MAME name standard in root folder | +| astrocade | Bally Astrocade | | | | | +| atari2600 | Atari 2600 | Stella (RetroArch) | Stella 2014 (RetroArch) | No | Single archive or ROM file in root folder | +| atari5200 | Atari 5200 | Atari800 (RetroArch) | | | | +| atari7800 | Atari 7800 ProSystem | ProSystem (RetroArch) | | | | +| atari800 | Atari 800 | Atari800 (RetroArch) | | | | +| atarijaguar | Atari Jaguar | Virtual Jaguar (RetroArch) | | | | +| atarijaguarcd | Atari Jaguar CD | Virtual Jaguar (RetroArch) | | | | +| atarilynx | Atari Lynx | Beetle Lynx (RetroArch) | | | | +| atarist | Atari ST [also STE and Falcon] | Hatari (RetroArch) | | | | +| atarixe | Atari XE | Atari800 (RetroArch) | | | | +| atomiswave | Atomiswave | Flycast (RetroArch) | | | | +| bbcmicro | BBC Micro | | | | | +| c64 | Commodore 64 | VICE x64sc Accurate (RetroArch) | VICE x64 Fast (RetroArch)
VICE x64 SuperCPU (RetroArch)
VICE x128 (RetroArch)
Frodo (RetroArch) | No | Single disk, tape r cartridge image in root folder and/or multi-disc images in separate folder | +| cavestory | Cave Story (NXEngine) | NXEngine (RetroArch) | | | | +| cdtv | Commodore CDTV | | | | | +| chailove | ChaiLove game engine | ChaiLove (RetroArch) | | | | +| channelf | Fairchild Channel F | FreeChaF (RetroArch) | | | | +| coco | Tandy Color Computer | | | | | +| colecovision | ColecoVision | blueMSX (RetroArch) | | | | +| daphne | Daphne Arcade Laserdisc Emulator | | | | | +| desktop | Desktop applications | N/A | | No | | +| doom | Doom | PrBoom (RetroArch) | | | | +| dos | DOS (PC) | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | +| dragon32 | Dragon 32 | | | | | +| dreamcast | Sega Dreamcast | Flycast (RetroArch) | | | | +| famicom | Nintendo Family Computer | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | +| fba | FinalBurn Alpha | FB Alpha 2012 (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | +| fbneo | FinalBurn Neo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | +| fds | Nintendo Famicom Disk System | Nestopia UE (RetroArch) | | Yes | Single archive or ROM file in root folder | +| gameandwatch | Nintendo Game and Watch | GW (RetroArch) | | | | +| gamegear | Sega Game Gear | Genesis Plus GX (RetroArch) | | | | +| gb | Nintendo Game Boy | bsnes (RetroArch) | | | | +| gba | Nintendo Game Boy Advance | Beetle GBA (RetroArch) | | | | +| gbc | Nintendo Game Boy Color | bsnes (RetroArch) | | | | +| gc | Nintendo GameCube | Dolphin (RetroArch) | | | | +| genesis | Sega Genesis | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | +| gx4000 | Amstrad GX4000 | | | | | +| intellivision | Mattel Electronics Intellivision | FreeIntv (RetroArch) | | | | +| kodi | Kodi home theatre software | N/A | | No | | +| lutris | Lutris open gaming platform | Lutris application [U] | | No | Shell script in root folder | +| lutro | Lutro game engine | Lutro (RetroArch) | | | | +| macintosh | Apple Macintosh | | | | | +| mame | Multiple Arcade Machine Emulator | MAME 2003-Plus (RetroArch) | MAME 2000 (RetroArch)
MAME 2010 (RetroArch)
MAME - Current (RetroArch)
FinalBurn Neo (RetroArch)
FB Alpha 2012 (RetroArch) | 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 (RetroArch) | | No | Single archive or ROM file in root folder | +| megacd | Sega Mega-CD | Genesis Plus GX (RetroArch) | | | | +| megacdjp | Sega Mega-CD [Japan] | Genesis Plus GX (RetroArch) | | | | +| megadrive | Sega Mega Drive | Genesis Plus GX (RetroArch) | Genesis Plus GX Wide (RetroArch)
PicoDrive (RetroArch)
BlastEm (RetroArch) | No | Single archive or ROM file in root folder | +| mess | Multi Emulator Super System | MESS 2015 (RetroArch) | | | | +| moonlight | Moonlight game streaming | | | | | +| moto | Thomson MO/TO series | Theodore (RetroArch) | | | | +| msx | MSX | blueMSX (RetroArch) | | | | +| msx1 | MSX1 | blueMSX (RetroArch) | | | | +| msx2 | MSX2 | blueMSX (RetroArch) | | | | +| msxturbor | MSX Turbo R | blueMSX (RetroArch) | | | | +| multivision | Othello Multivision | Gearsystem (RetroArch) | | | | +| naomi | Sega NAOMI | Flycast (RetroArch) | | | | +| naomigd | Sega NAOMI GD-ROM | Flycast (RetroArch) | | | | +| n3ds | Nintendo 3DS | Citra (RetroArch) | | | | +| n64 | Nintendo 64 | Mupen64Plus-Next (RetroArch) [UW]
ParaLLEl N64 (RetroArch) [M] | ParaLLEl N64 (RetroArch) [UW] | No | Single archive or ROM file in root folder | +| nds | Nintendo DS | melonDS (RetroArch) | | | | +| neogeo | SNK Neo Geo | FinalBurn Neo (RetroArch) | | Yes | Single archive file following MAME name standard in root folder | +| neogeocd | SNK Neo Geo CD | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | +| neogeocdjp | SNK Neo Geo CD [Japan] | NeoCD (RetroArch) | | Yes | Single archive in root folder (which includes the CD image and ripped audio) | +| nes | Nintendo Entertainment System | Nestopia UE (RetroArch) | FCEUmm (RetroArch)
Mesen (RetroArch)
QuickNES (RetroArch) | No | Single archive or ROM file in root folder | +| ngp | SNK Neo Geo Pocket | Beetle NeoPop (RetroArch) | | | | +| ngpc | SNK Neo Geo Pocket Color | Beetle NeoPop (RetroArch) | | | | +| odyssey2 | Magnavox Odyssey2 | O2EM (RetroArch) | | | | +| openbor | OpenBOR game engine | | | | | +| oric | Tangerine Computer Systems Oric | | | | | +| palm | Palm OS | Mu (RetroArch) | | | | +| pc | IBM PC | DOSBox-core (RetroArch) | DOSBox-Pure (RetroArch)
DOSBox-SVN (RetroArch) | No | In separate folder (one folder per game, with complete file structure retained) | +| pc88 | NEC PC-8800 series | QUASI88 (RetroArch) | | | | +| pc98 | NEC PC-9800 series | Neko Project II Kai (RetroArch) | | | | +| pcengine | NEC PC Engine | Beetle PCE (RetroArch) | Beetle PCE FAST (RetroArch) | No | Single archive or ROM file in root folder | +| pcenginecd | NEC PC Engine CD | Beetle PCE (RetroArch) | Beetle PCE FAST (RetroArch) | Yes | | +| pcfx | NEC PC-FX | Beetle PC-FX (RetroArch) | | | | +| pokemini | Nintendo Pokémon Mini | PokeMini (RetroArch) | | No | | +| ports | Ports | N/A | | No | Shell/batch script in separate folder (possibly combined with game data) | +| ps2 | Sony PlayStation 2 | PCSX2 (RetroArch) [UW] | | | | +| ps3 | Sony PlayStation 3 | | | | | +| ps4 | Sony PlayStation 4 | | | | | +| psp | Sony PlayStation Portable | PPSSPP (RetroArch) | | | | +| psvita | Sony PlayStation Vita | | | | | +| psx | Sony PlayStation | Beetle PSX (RetroArch) | Beetle PSX HW (RetroArch)
PCSX ReARMed (RetroArch)
DuckStation (RetroArch) | 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 (RetroArch) | | | | +| satellaview | Nintendo Satellaview | Snes9x - Current (RetroArch) | | | | +| saturn | Sega Saturn | Beetle Saturn (RetroArch) | | | | +| saturnjp | Sega Saturn [Japan] | Beetle Saturn (RetroArch) | | | | +| scummvm | ScummVM game engine | ScummVM (RetroArch) | | No | In separate folder (one folder per game, with complete file structure retained) | +| sega32x | Sega Mega Drive 32X | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | +| sega32xjp | Sega Super 32X [Japan] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | +| sega32xna | Sega Genesis 32X [North America] | PicoDrive (RetroArch) | | No | Single archive or ROM file in root folder | +| segacd | Sega CD | Genesis Plus GX (RetroArch) | | | | +| sg-1000 | Sega SG-1000 | Genesis Plus GX (RetroArch) | | | | +| snes | Nintendo SNES (Super Nintendo) | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | +| snesna | Nintendo SNES (Super Nintendo) [North America] | Snes9x - Current (RetroArch) | Snes9x 2010 (RetroArch)
bsnes (RetroArch)
bsnes-mercury Accuracy (RetroArch)
Beetle Supafaust (RetroArch) [UW]
Mesen-S (RetroArch) | No | Single archive or ROM file in root folder | +| solarus | Solarus game engine | | | | | +| spectravideo | Spectravideo | blueMSX (RetroArch) | | | | +| steam | Valve Steam | Steam application | | No | Shell script/batch file in root folder | +| stratagus | Stratagus game engine | | | | | +| sufami | Bandai SuFami Turbo | Snes9x - Current (RetroArch) | | | | +| supergrafx | NEC SuperGrafx | Beetle SuperGrafx (RetroArch) | | | | +| switch | Nintendo Switch | Yuzu [UW] | | Yes | | +| tanodragon | Tano Dragon | | | | | +| tg16 | NEC TurboGrafx-16 | Beetle PCE (RetroArch) | Beetle PCE FAST (RetroArch) | No | Single archive or ROM file in root folder | +| tg-cd | NEC TurboGrafx-CD | Beetle PCE (RetroArch) | Beetle PCE FAST (RetroArch) | Yes | | +| ti99 | Texas Instruments TI-99 | | | | | +| tic80 | TIC-80 game engine | | | | | +| to8 | Thomson TO8 | Theodore (RetroArch) | | | | +| trs-80 | Tandy TRS-80 | | | | | +| uzebox | Uzebox | Uzem (RetroArch) | | | | +| vectrex | Vectrex | vecx (RetroArch) | | | | +| videopac | Philips Videopac G7000 (Magnavox Odyssey2) | O2EM (RetroArch) | | | | +| virtualboy | Nintendo Virtual Boy | Beetle VB (RetroArch) | | | | +| wii | Nintendo Wii | Dolphin (RetroArch) | | | | +| wiiu | Nintendo Wii U | | | | | +| wonderswan | Bandai WonderSwan | Beetle Cygne (RetroArch) | | | | +| wonderswancolor | Bandai WonderSwan Color | Beetle Cygne (RetroArch) | | | | +| x1 | Sharp X1 | x1 (RetroArch) | | | Single archive or ROM file in root folder | +| x68000 | Sharp X68000 | PX68k (RetroArch) | | | | +| xbox | Microsoft Xbox | | | | | +| xbox360 | Microsoft Xbox 360 | | | | | +| zmachine | Infocom Z-machine | | | | | +| zx81 | Sinclair ZX81 | EightyOne (RetroArch) | | | | +| zxspectrum | Sinclair ZX Spectrum | Fuse (RetroArch) | | | | From 9cbf97032dc51ad38a78dceff4b386d1b090d4c5 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 20:34:23 +0200 Subject: [PATCH 61/64] Removed the '(RetroArch)' text from all alternative emulator labels. --- resources/systems/macos/es_systems.xml | 134 +++++++++++---------- resources/systems/unix/es_systems.xml | 146 ++++++++++++----------- resources/systems/windows/es_systems.xml | 146 ++++++++++++----------- 3 files changed, 219 insertions(+), 207 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index 6c7af165f..5f07447c0 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -96,12 +96,12 @@ Arcade %ROMPATH%/arcade .cmd .CMD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.dylib %ROM% arcade arcade @@ -119,8 +119,8 @@ Atari 2600 %ROMPATH%/atari2600 .a26 .A26 .bin .BIN .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella2014_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella2014_libretro.dylib %ROM% atari2600 atari2600 @@ -219,11 +219,11 @@ Commodore 64 %ROMPATH%/c64 .bin .BIN .cmd .CMD .crt .CRT .d2m .D2M .d4m .D4M .d64 .D64 .d6z .D6Z .d71 .D71 .d7z .D7Z .d80 .D80 .d81 .D81 .d82 .D82 .d8z .D8Z .g41 .G41 .g4z .G4Z .g64 .G64 .g6z .G6Z .gz .GZ .lnx .LNX .m3u .M3U .nbz .NBZ .nib .NIB .p00 .P00 .prg .PRG .t64 .T64 .tap .TAP .vfl .VFL .vsf .VSF .x64 .X64 .x6z .X6Z .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64sc_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_xscpu64_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x128_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/frodo_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64sc_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_xscpu64_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x128_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/frodo_libretro.dylib %ROM% c64 c64 @@ -313,9 +313,9 @@ DOS (PC) %ROMPATH%/dos .bat .BAT .com .COM .conf .CONF .cue .CUE .exe .EXE .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.dylib %ROM% dos dos @@ -342,10 +342,10 @@ Nintendo Family Computer %ROMPATH%/famicom .nes .NES .unf .UNF .unif .UNIF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/nestopia_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fceumm_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/quicknes_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/nestopia_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fceumm_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/quicknes_libretro.dylib %ROM% famicom famicom @@ -354,7 +354,11 @@ FinalBurn Alpha %ROMPATH%/fba .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_neogeo_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_cps1_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_cps2_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_cps3_libretro.dylib %ROM% arcade fba @@ -435,10 +439,10 @@ Sega Genesis %ROMPATH%/genesis .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% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_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%/picodrive_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_libretro.dylib %ROM% genesis genesis @@ -501,12 +505,12 @@ Multiple Arcade Machine Emulator %ROMPATH%/mame .cmd .CMD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.dylib %ROM% arcade mame @@ -560,10 +564,10 @@ Sega Mega Drive %ROMPATH%/megadrive .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% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_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%/picodrive_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_libretro.dylib %ROM% megadrive megadrive @@ -716,10 +720,10 @@ Nintendo Entertainment System %ROMPATH%/nes .nes .NES .unf .UNF .unif .UNIF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/nestopia_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fceumm_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/quicknes_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/nestopia_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fceumm_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/quicknes_libretro.dylib %ROM% nes nes @@ -782,9 +786,9 @@ IBM PC %ROMPATH%/pc .bat .BAT .com .COM .conf .CONF .cue .CUE .exe .EXE .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.dylib %ROM% pc pc @@ -811,8 +815,8 @@ NEC PC Engine %ROMPATH%/pcengine .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% pcengine pcengine @@ -821,8 +825,8 @@ NEC PC Engine CD %ROMPATH%/pcenginecd .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% pcenginecd pcenginecd @@ -903,10 +907,10 @@ Sony PlayStation %ROMPATH%/psx .bin .BIN .cbn .CBN .ccd .CCD .chd .CHD .cue .CUE .ecm .ECM .exe .EXE .img .IMG .iso .ISO .m3u .M3U .mdf .MDF .mds .MDS .pbp .PBP .psexe .PSEXE .psf .PSF .toc .TOC .z .Z .znx .ZNX .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_hw_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/pcsx_rearmed_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/duckstation_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_hw_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/pcsx_rearmed_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/duckstation_libretro.dylib %ROM% psx psx @@ -1014,11 +1018,11 @@ Nintendo SNES (Super Nintendo) %ROMPATH%/snes .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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% + %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% snes snes @@ -1027,11 +1031,11 @@ Nintendo SNES (Super Nintendo) %ROMPATH%/snesna .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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% + %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% snes snesna @@ -1093,7 +1097,7 @@ switch Nintendo Switch %ROMPATH%/switch - .nca .NCA .nro .NRO .nso .NSO .nsp .NSP .xci .XCI .7z .7Z .zip .ZIP + .7z .7Z .zip .ZIP PLACEHOLDER %ROM% switch switch @@ -1112,8 +1116,8 @@ NEC TurboGrafx-16 %ROMPATH%/tg16 .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% pcengine tg16 @@ -1122,8 +1126,8 @@ NEC TurboGrafx-CD %ROMPATH%/tg-cd .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.dylib %ROM% tg-cd diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index 5689a086f..c6a48b542 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -15,8 +15,8 @@ Nintendo 64DD %ROMPATH%/64dd .n64 .N64 .v64 .V64 .z64 .Z64 .bin .BIN .u1 .U1 .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mupen64plus_next_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/parallel_n64_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mupen64plus_next_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/parallel_n64_libretro.so %ROM% n64 64dd @@ -97,12 +97,12 @@ Arcade %ROMPATH%/arcade .cmd .CMD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.so %ROM% arcade arcade @@ -120,8 +120,8 @@ Atari 2600 %ROMPATH%/atari2600 .a26 .A26 .bin .BIN .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella2014_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/stella2014_libretro.so %ROM% atari2600 atari2600 @@ -220,11 +220,11 @@ Commodore 64 %ROMPATH%/c64 .bin .BIN .cmd .CMD .crt .CRT .d2m .D2M .d4m .D4M .d64 .D64 .d6z .D6Z .d71 .D71 .d7z .D7Z .d80 .D80 .d81 .D81 .d82 .D82 .d8z .D8Z .g41 .G41 .g4z .G4Z .g64 .G64 .g6z .G6Z .gz .GZ .lnx .LNX .m3u .M3U .nbz .NBZ .nib .NIB .p00 .P00 .prg .PRG .t64 .T64 .tap .TAP .vfl .VFL .vsf .VSF .x64 .X64 .x6z .X6Z .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64sc_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_xscpu64_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x128_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/frodo_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64sc_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x64_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_xscpu64_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/vice_x128_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/frodo_libretro.so %ROM% c64 c64 @@ -314,9 +314,9 @@ DOS (PC) %ROMPATH%/dos .bat .BAT .com .COM .conf .CONF .cue .CUE .exe .EXE .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.so %ROM% dos dos @@ -343,10 +343,10 @@ Nintendo Family Computer %ROMPATH%/famicom .nes .NES .unf .UNF .unif .UNIF .7z .7Z .zip .ZIP - %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%/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% famicom famicom @@ -355,7 +355,11 @@ FinalBurn Alpha %ROMPATH%/fba .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_neogeo_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_cps1_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_cps2_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_cps3_libretro.so %ROM% arcade fba @@ -436,10 +440,10 @@ Sega Genesis %ROMPATH%/genesis .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% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_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%/picodrive_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_libretro.so %ROM% genesis genesis @@ -502,12 +506,12 @@ Multiple Arcade Machine Emulator %ROMPATH%/mame .cmd .CMD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2003_plus_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2000_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame2010_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mame_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbneo_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/fbalpha2012_libretro.so %ROM% arcade mame @@ -561,10 +565,10 @@ Sega Mega Drive %ROMPATH%/megadrive .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% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_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%/picodrive_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/blastem_libretro.so %ROM% megadrive megadrive @@ -654,8 +658,8 @@ Nintendo 64 %ROMPATH%/n64 .n64 .N64 .v64 .V64 .z64 .Z64 .bin .BIN .u1 .U1 .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mupen64plus_next_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/parallel_n64_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mupen64plus_next_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/parallel_n64_libretro.so %ROM% n64 n64 @@ -718,10 +722,10 @@ Nintendo Entertainment System %ROMPATH%/nes .nes .NES .unf .UNF .unif .UNIF .7z .7Z .zip .ZIP - %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%/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% nes nes @@ -784,9 +788,9 @@ IBM PC %ROMPATH%/pc .bat .BAT .com .COM .conf .CONF .cue .CUE .exe .EXE .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_core_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_pure_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/dosbox_svn_libretro.so %ROM% pc pc @@ -813,8 +817,8 @@ NEC PC Engine %ROMPATH%/pcengine .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% pcengine pcengine @@ -823,8 +827,8 @@ NEC PC Engine CD %ROMPATH%/pcenginecd .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% pcenginecd pcenginecd @@ -905,10 +909,10 @@ Sony PlayStation %ROMPATH%/psx .bin .BIN .cbn .CBN .ccd .CCD .chd .CHD .cue .CUE .ecm .ECM .exe .EXE .img .IMG .iso .ISO .m3u .M3U .mdf .MDF .mds .MDS .pbp .PBP .psexe .PSEXE .psf .PSF .toc .TOC .z .Z .znx .ZNX .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_hw_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/pcsx_rearmed_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/duckstation_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_psx_hw_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/pcsx_rearmed_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/duckstation_libretro.so %ROM% psx psx @@ -1016,12 +1020,12 @@ Nintendo SNES (Super Nintendo) %ROMPATH%/snes .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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%/mednafen_supafaust_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_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% snes snes @@ -1030,12 +1034,12 @@ Nintendo SNES (Super Nintendo) %ROMPATH%/snesna .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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%/mednafen_supafaust_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mesen-s_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% snes snesna @@ -1098,7 +1102,7 @@ Nintendo Switch %ROMPATH%/switch .nca .NCA .nro .NRO .nso .NSO .nsp .NSP .xci .XCI .7z .7Z .zip .ZIP - %EMULATOR_YUZU% %ROM% + %EMULATOR_YUZU% %ROM% switch switch @@ -1116,8 +1120,8 @@ NEC TurboGrafx-16 %ROMPATH%/tg16 .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% pcengine tg16 @@ -1126,8 +1130,8 @@ NEC TurboGrafx-CD %ROMPATH%/tg-cd .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_fast_libretro.so %ROM% pcenginecd tg-cd diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 1fe8f834d..7608e9b80 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -15,8 +15,8 @@ Nintendo 64DD %ROMPATH%\64dd .n64 .N64 .v64 .V64 .z64 .Z64 .bin .BIN .u1 .U1 .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mupen64plus_next_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\parallel_n64_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mupen64plus_next_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\parallel_n64_libretro.dll %ROM% n64 64dd @@ -97,12 +97,12 @@ Arcade %ROMPATH%\arcade .cmd .CMD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2000_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2003_plus_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2010_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbneo_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2000_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2003_plus_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2010_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbneo_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_libretro.dll %ROM% arcade arcade @@ -120,8 +120,8 @@ Atari 2600 %ROMPATH%\atari2600 .a26 .A26 .bin .BIN .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\stella_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\stella2014_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\stella_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\stella2014_libretro.dll %ROM% atari2600 atari2600 @@ -220,11 +220,11 @@ Commodore 64 %ROMPATH%\c64 .bin .BIN .cmd .CMD .crt .CRT .d2m .D2M .d4m .D4M .d64 .D64 .d6z .D6Z .d71 .D71 .d7z .D7Z .d80 .D80 .d81 .D81 .d82 .D82 .d8z .D8Z .g41 .G41 .g4z .G4Z .g64 .G64 .g6z .G6Z .gz .GZ .lnx .LNX .m3u .M3U .nbz .NBZ .nib .NIB .p00 .P00 .prg .PRG .t64 .T64 .tap .TAP .vfl .VFL .vsf .VSF .x64 .X64 .x6z .X6Z .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x64sc_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x64_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_xscpu64_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x128_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\frodo_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x64sc_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x64_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_xscpu64_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\vice_x128_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\frodo_libretro.dll %ROM% c64 c64 @@ -314,9 +314,9 @@ DOS (PC) %ROMPATH%\dos .bat .BAT .com .COM .conf .CONF .cue .CUE .exe .EXE .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_core_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_pure_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_svn_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_core_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_pure_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_svn_libretro.dll %ROM% dos dos @@ -343,10 +343,10 @@ Nintendo Family Computer %ROMPATH%\famicom .nes .NES .unf .UNF .unif .UNIF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\nestopia_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fceumm_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\quicknes_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\nestopia_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fceumm_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\quicknes_libretro.dll %ROM% famicom famicom @@ -355,7 +355,11 @@ FinalBurn Alpha %ROMPATH%\fba .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_neogeo_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_cps1_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_cps2_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_cps3_libretro.dll %ROM% arcade fba @@ -436,10 +440,10 @@ Sega Genesis %ROMPATH%\genesis .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% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\blastem_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%\picodrive_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\blastem_libretro.dll %ROM% genesis genesis @@ -502,12 +506,12 @@ Multiple Arcade Machine Emulator %ROMPATH%\mame .cmd .CMD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2003_plus_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2000_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2010_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbneo_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2003_plus_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2000_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame2010_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mame_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbneo_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fbalpha2012_libretro.dll %ROM% arcade mame @@ -561,10 +565,10 @@ Sega Mega Drive %ROMPATH%\megadrive .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% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\blastem_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%\picodrive_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\blastem_libretro.dll %ROM% megadrive megadrive @@ -654,8 +658,8 @@ Nintendo 64 %ROMPATH%\n64 .n64 .N64 .v64 .V64 .z64 .Z64 .bin .BIN .u1 .U1 .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mupen64plus_next_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\parallel_n64_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mupen64plus_next_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\parallel_n64_libretro.dll %ROM% n64 n64 @@ -718,10 +722,10 @@ Nintendo Entertainment System %ROMPATH%\nes .nes .NES .unf .UNF .unif .UNIF .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\nestopia_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fceumm_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\quicknes_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\nestopia_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\fceumm_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\quicknes_libretro.dll %ROM% nes nes @@ -784,9 +788,9 @@ IBM PC %ROMPATH%\pc .bat .BAT .com .COM .conf .CONF .cue .CUE .exe .EXE .iso .ISO .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_core_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_pure_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_svn_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_core_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_pure_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\dosbox_svn_libretro.dll %ROM% pc pc @@ -813,8 +817,8 @@ NEC PC Engine %ROMPATH%\pcengine .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% pcengine pcengine @@ -823,8 +827,8 @@ NEC PC Engine CD %ROMPATH%\pcenginecd .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% pcenginecd pcenginecd @@ -905,10 +909,10 @@ Sony PlayStation %ROMPATH%\psx .bin .BIN .cbn .CBN .ccd .CCD .chd .CHD .cue .CUE .ecm .ECM .exe .EXE .img .IMG .iso .ISO .m3u .M3U .mdf .MDF .mds .MDS .pbp .PBP .psexe .PSEXE .psf .PSF .toc .TOC .z .Z .znx .ZNX .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_psx_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_psx_hw_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\pcsx_rearmed_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\duckstation_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_psx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_psx_hw_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\pcsx_rearmed_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\duckstation_libretro.dll %ROM% psx psx @@ -1016,12 +1020,12 @@ Nintendo SNES (Super Nintendo) %ROMPATH%\snes .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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%\mednafen_supafaust_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen-s_libretro.dll %ROM% + %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%\mednafen_supafaust_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen-s_libretro.dll %ROM% snes snes @@ -1030,12 +1034,12 @@ Nintendo SNES (Super Nintendo) %ROMPATH%\snesna .bin .BIN .bml .BML .bs .BS .bsx .BSX .dx2 .DX2 .fig .FIG .gd3 .GD3 .gd7 .GD7 .mgd .MGD .sfc .SFC .smc .SMC .st .ST .swc .SWC .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%\mednafen_supafaust_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen-s_libretro.dll %ROM% + %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%\mednafen_supafaust_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mesen-s_libretro.dll %ROM% snes snesna @@ -1098,7 +1102,7 @@ Nintendo Switch %ROMPATH%\switch .nca .NCA .nro .NRO .nso .NSO .nsp .NSP .xci .XCI .7z .7Z .zip .ZIP - %EMULATOR_YUZU% %ROM% + %EMULATOR_YUZU% %ROM% switch switch @@ -1116,8 +1120,8 @@ NEC TurboGrafx-16 %ROMPATH%\tg16 .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% pcengine tg16 @@ -1126,8 +1130,8 @@ NEC TurboGrafx-CD %ROMPATH%\tg-cd .bin .BIN .ccd .CCD .chd .CHD .cue .CUE .img .IMG .iso .ISO .m3u .M3U .pce .PCE .sgx .SGX .toc .TOC .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_fast_libretro.dll %ROM% pcenginecd tg-cd From 78166bbcf4f6c6d08874ab22c315073bd8402143 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 21:08:45 +0200 Subject: [PATCH 62/64] Added alternative emulators to the mastersystem and supergrafx systems. --- resources/systems/macos/es_systems.xml | 11 ++++++++--- resources/systems/unix/es_systems.xml | 11 ++++++++--- resources/systems/windows/es_systems.xml | 11 ++++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index 5f07447c0..0457f49ff 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -536,8 +536,12 @@ mastersystem Sega Master System %ROMPATH%/mastersystem - .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%/genesis_plus_gx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/smsplus_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearsystem_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/picodrive_libretro.dylib %ROM% mastersystem mastersystem @@ -1089,7 +1093,8 @@ NEC SuperGrafx %ROMPATH%/supergrafx .pce .PCE .sgx .SGX .cue .CUE .ccd .CCD .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_supergrafx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_supergrafx_libretro.dylib %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.dylib %ROM% supergrafx supergrafx diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index c6a48b542..83c0f653a 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -537,8 +537,12 @@ mastersystem Sega Master System %ROMPATH%/mastersystem - .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%/genesis_plus_gx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/genesis_plus_gx_wide_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/smsplus_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/gearsystem_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/picodrive_libretro.so %ROM% mastersystem mastersystem @@ -1093,7 +1097,8 @@ NEC SuperGrafx %ROMPATH%/supergrafx .pce .PCE .sgx .SGX .cue .CUE .ccd .CCD .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_supergrafx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_supergrafx_libretro.so %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%/mednafen_pce_libretro.so %ROM% supergrafx supergrafx diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 7608e9b80..62843d550 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -537,8 +537,12 @@ mastersystem Sega Master System %ROMPATH%\mastersystem - .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%\genesis_plus_gx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\genesis_plus_gx_wide_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\smsplus_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\gearsystem_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\picodrive_libretro.dll %ROM% mastersystem mastersystem @@ -1093,7 +1097,8 @@ NEC SuperGrafx %ROMPATH%\supergrafx .pce .PCE .sgx .SGX .cue .CUE .ccd .CCD .chd .CHD .7z .7Z .zip .ZIP - %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_supergrafx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_supergrafx_libretro.dll %ROM% + %EMULATOR_RETROARCH% -L %CORE_RETROARCH%\mednafen_pce_libretro.dll %ROM% supergrafx supergrafx From fe20ec51cb83ca8580a841acdcf8780128502ee1 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 23 Sep 2021 21:46:36 +0200 Subject: [PATCH 63/64] Documentation update. --- INSTALL-DEV.md | 29 +++--- USERGUIDE-DEV.md | 231 ++++++++++++++++++++++++----------------------- 2 files changed, 132 insertions(+), 128 deletions(-) diff --git a/INSTALL-DEV.md b/INSTALL-DEV.md index d7963cb34..e7db548c6 100644 --- a/INSTALL-DEV.md +++ b/INSTALL-DEV.md @@ -1447,10 +1447,10 @@ Below is an overview of the file layout with various examples. For the command t - %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%/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%