mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
ams: make mesosphere usage user-visible in display version
This commit is contained in:
parent
1930880270
commit
8d46d901d9
3 changed files with 16 additions and 2 deletions
|
@ -56,10 +56,18 @@ namespace ams::mitm::settings {
|
||||||
const auto api_info = exosphere::GetApiInfo();
|
const auto api_info = exosphere::GetApiInfo();
|
||||||
const char emummc_char = emummc::IsActive() ? 'E' : 'S';
|
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. */
|
/* NOTE: We have carefully accounted for the size of the string we print. */
|
||||||
/* No truncation occurs assuming two-digits for all version number components. */
|
/* No truncation occurs assuming two-digits for all version number components. */
|
||||||
char display_version[sizeof(g_ams_firmware_version.display_version)];
|
char display_version[sizeof(g_ams_firmware_version.display_version)];
|
||||||
std::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::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);
|
||||||
|
|
||||||
std::memcpy(g_ams_firmware_version.display_version, display_version, sizeof(display_version));
|
std::memcpy(g_ams_firmware_version.display_version, display_version, sizeof(display_version));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -351,6 +351,10 @@ namespace ams::creport {
|
||||||
|
|
||||||
void CrashReport::SaveToFile(ScopedFile &file) {
|
void CrashReport::SaveToFile(ScopedFile &file) {
|
||||||
file.WriteFormat("Atmosphère Crash Report (v1.5):\n");
|
file.WriteFormat("Atmosphère Crash Report (v1.5):\n");
|
||||||
|
|
||||||
|
/* TODO: Remove in Atmosphere 1.0.0. */
|
||||||
|
file.WriteFormat("Mesosphere: %s\n", svc::IsKernelMesosphere() ? "Enabled" : "Disabled");
|
||||||
|
|
||||||
file.WriteFormat("Result: 0x%X (2%03d-%04d)\n\n", this->result.GetValue(), this->result.GetModule(), this->result.GetDescription());
|
file.WriteFormat("Result: 0x%X (2%03d-%04d)\n\n", this->result.GetValue(), this->result.GetModule(), this->result.GetDescription());
|
||||||
|
|
||||||
/* Process Info. */
|
/* Process Info. */
|
||||||
|
|
|
@ -214,7 +214,9 @@ namespace ams::fatal::srv {
|
||||||
font::AddSpacingLines(0.5f);
|
font::AddSpacingLines(0.5f);
|
||||||
font::PrintFormatLine( "Program: %016lX", static_cast<u64>(this->context->program_id));
|
font::PrintFormatLine( "Program: %016lX", static_cast<u64>(this->context->program_id));
|
||||||
font::AddSpacingLines(0.5f);
|
font::AddSpacingLines(0.5f);
|
||||||
font::PrintFormatLine("Firmware: %s (Atmosphère %u.%u.%u-%s)", config.GetFirmwareVersion().display_version, ATMOSPHERE_RELEASE_VERSION, ams::GetGitRevision());
|
|
||||||
|
/* TODO: Remove Mesosphere identifier in 1.0.0. */
|
||||||
|
font::PrintFormatLine("Firmware: %s (Atmosphère%s %u.%u.%u-%s)", config.GetFirmwareVersion().display_version, svc::IsKernelMesosphere() ? " M" : "", ATMOSPHERE_RELEASE_VERSION, ams::GetGitRevision());
|
||||||
font::AddSpacingLines(1.5f);
|
font::AddSpacingLines(1.5f);
|
||||||
if (!exosphere::ResultVersionMismatch::Includes(this->context->result)) {
|
if (!exosphere::ResultVersionMismatch::Includes(this->context->result)) {
|
||||||
font::Print(config.GetErrorDescription());
|
font::Print(config.GetErrorDescription());
|
||||||
|
|
Loading…
Reference in a new issue