ams-1.0.0: meso no longer optional, remove conditional logic

This commit is contained in:
Michael Scire
2021-09-05 10:08:30 -07:00
committed by SciresM
parent 320f0bbcfd
commit da208f8001
10 changed files with 19 additions and 53 deletions

View File

@@ -56,17 +56,11 @@ namespace ams::mitm::settings {
const auto api_info = exosphere::GetApiInfo();
const char emummc_char = emummc::IsActive() ? 'E' : 'S';
/* NOTE: While Mesosphere is in experimental/opt-in, we will display it as part of the firmware. */
const char mesosphere_char = svc::IsKernelMesosphere() ? 'M' : '0';
/* TODO: Remove separate display for mesosphere vs not mesosphere in Atmosphere 1.0.0. */
AMS_ABORT_UNLESS(api_info.GetMajorVersion() == 0);
/* NOTE: We have carefully accounted for the size of the string we print. */
/* No truncation occurs assuming two-digits for all version number components. */
char display_version[sizeof(g_ams_firmware_version.display_version)];
util::SNPrintf(display_version, sizeof(display_version), "%s|AMS %c.%u.%u|%c", g_ams_firmware_version.display_version, mesosphere_char, api_info.GetMinorVersion(), api_info.GetMicroVersion(), emummc_char);
util::SNPrintf(display_version, sizeof(display_version), "%s|AMS %u.%u.%u|%c", g_ams_firmware_version.display_version, api_info.GetMajorVersion(), api_info.GetMinorVersion(), api_info.GetMicroVersion(), emummc_char);
std::memcpy(g_ams_firmware_version.display_version, display_version, sizeof(display_version));
}