From 2a63655f7e9291e6bd6b04d7d38a473fe7b7cf12 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 28 Feb 2023 00:02:31 +0100 Subject: [PATCH] Minimal cosmetic improvement to the generated systeminfo.txt files. --- es-app/src/SystemData.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 9963a10c3..f88a0f883 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -1003,6 +1003,11 @@ bool SystemData::createSystemDirectories() commands.emplace_back(entry.text().get()); } platform = Utils::String::toLower(system.child("platform").text().get()); + const bool multiplePlatforms { + std::find_if(platform.cbegin(), platform.cend(), [](char character) { + return (std::isspace(character) || character == ','); + }) != platform.cend()}; + themeFolder = system.child("theme").text().as_string(name.c_str()); // Check that the %ROMPATH% variable is actually used for the path element. @@ -1082,7 +1087,8 @@ bool SystemData::createSystemDirectories() systemInfoFile << (*it) << std::endl; systemInfoFile << std::endl; } - systemInfoFile << "Platform (for scraping):" << std::endl; + systemInfoFile << "Platform" << (multiplePlatforms ? "s" : "") + << " (for scraping):" << std::endl; systemInfoFile << platform << std::endl << std::endl; systemInfoFile << "Theme folder:" << std::endl; systemInfoFile << themeFolder << std::endl;