ams: update to build with gcc10/c++20
This commit is contained in:
@@ -40,7 +40,7 @@ namespace ams::mitm::fs {
|
||||
s64 file_table_size;
|
||||
s64 file_partition_ofs;
|
||||
};
|
||||
static_assert(std::is_pod<Header>::value && sizeof(Header) == 0x50);
|
||||
static_assert(util::is_pod<Header>::value && sizeof(Header) == 0x50);
|
||||
|
||||
struct DirectoryEntry {
|
||||
u32 parent;
|
||||
@@ -51,7 +51,7 @@ namespace ams::mitm::fs {
|
||||
u32 name_size;
|
||||
char name[];
|
||||
};
|
||||
static_assert(std::is_pod<DirectoryEntry>::value && sizeof(DirectoryEntry) == 0x18);
|
||||
static_assert(util::is_pod<DirectoryEntry>::value && sizeof(DirectoryEntry) == 0x18);
|
||||
|
||||
struct FileEntry {
|
||||
u32 parent;
|
||||
@@ -62,7 +62,7 @@ namespace ams::mitm::fs {
|
||||
u32 name_size;
|
||||
char name[];
|
||||
};
|
||||
static_assert(std::is_pod<FileEntry>::value && sizeof(FileEntry) == 0x20);
|
||||
static_assert(util::is_pod<FileEntry>::value && sizeof(FileEntry) == 0x20);
|
||||
|
||||
template<typename Entry>
|
||||
class TableReader {
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace ams::settings::fwdbg {
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(std::is_pod<SdKeyValueStoreEntry>::value);
|
||||
static_assert(util::is_pod<SdKeyValueStoreEntry>::value);
|
||||
|
||||
constexpr inline bool operator==(const SdKeyValueStoreEntry &lhs, const SdKeyValueStoreEntry &rhs) {
|
||||
if (lhs.HasValue() != rhs.HasValue()) {
|
||||
|
||||
@@ -102,5 +102,7 @@ int main(int argc, char **argv)
|
||||
|
||||
/* Launch all programs off of SYSTEM/the SD. */
|
||||
boot2::LaunchPostSdCardBootPrograms();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ namespace ams::creport {
|
||||
}
|
||||
|
||||
void CrashReport::SaveToFile(ScopedFile &file) {
|
||||
file.WriteFormat(u8"Atmosphère Crash Report (v1.5):\n");
|
||||
file.WriteFormat("Atmosphère Crash Report (v1.5):\n");
|
||||
file.WriteFormat("Result: 0x%X (2%03d-%04d)\n\n", this->result.GetValue(), this->result.GetModule(), this->result.GetDescription());
|
||||
|
||||
/* Process Info. */
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace ams::dmnt::cheat::impl {
|
||||
}
|
||||
|
||||
/* Clear metadata. */
|
||||
static_assert(std::is_pod<decltype(this->cheat_process_metadata)>::value, "CheatProcessMetadata definition!");
|
||||
static_assert(util::is_pod<decltype(this->cheat_process_metadata)>::value, "CheatProcessMetadata definition!");
|
||||
std::memset(&this->cheat_process_metadata, 0, sizeof(this->cheat_process_metadata));
|
||||
|
||||
/* Clear cheat list. */
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace ams::dmnt {
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(std::is_pod<TargetIOFileHandle>::value && sizeof(TargetIOFileHandle) == sizeof(u64), "TargetIOFileHandle");
|
||||
static_assert(util::is_pod<TargetIOFileHandle>::value && sizeof(TargetIOFileHandle) == sizeof(u64), "TargetIOFileHandle");
|
||||
|
||||
class DebugMonitorService final : public sf::IServiceObject {
|
||||
private:
|
||||
|
||||
@@ -77,21 +77,21 @@ namespace ams::fatal::srv {
|
||||
|
||||
/* Setup messages. */
|
||||
{
|
||||
this->error_msg = u8"Error Code: 2%03d-%04d (0x%x)\n";
|
||||
this->error_msg = "Error Code: 2%03d-%04d (0x%x)\n";
|
||||
|
||||
this->error_desc = u8"An error has occured.\n\n"
|
||||
u8"Please press the POWER Button to restart the console normally, or a VOL button\n"
|
||||
u8"to reboot to a payload (or RCM, if none is present). If you are unable to\n"
|
||||
u8"restart the console, hold the POWER Button for 12 seconds to turn the console off.\n\n"
|
||||
u8"If the problem persists, refer to the Nintendo Support Website.\n"
|
||||
u8"support.nintendo.com/switch/error\n";
|
||||
this->error_desc = "An error has occured.\n\n"
|
||||
"Please press the POWER Button to restart the console normally, or a VOL button\n"
|
||||
"to reboot to a payload (or RCM, if none is present). If you are unable to\n"
|
||||
"restart the console, hold the POWER Button for 12 seconds to turn the console off.\n\n"
|
||||
"If the problem persists, refer to the Nintendo Support Website.\n"
|
||||
"support.nintendo.com/switch/error\n";
|
||||
|
||||
/* If you're running Atmosphere on a quest unit for some reason, talk to me on discord. */
|
||||
this->quest_desc = u8"Please call 1-800-875-1852 for service.\n\n"
|
||||
u8"Also, please be aware that running Atmosphere on a Quest device is not fully\n"
|
||||
u8"supported. Perhaps try booting your device without Atmosphere before calling\n"
|
||||
u8"an official Nintendo service hotline. If you encounter further issues, please\n"
|
||||
u8"contact SciresM#0524 on Discord, or via some other means.\n";
|
||||
this->quest_desc = "Please call 1-800-875-1852 for service.\n\n"
|
||||
"Also, please be aware that running Atmosphere on a Quest device is not fully\n"
|
||||
"supported. Perhaps try booting your device without Atmosphere before calling\n"
|
||||
"an official Nintendo service hotline. If you encounter further issues, please\n"
|
||||
"contact SciresM#0524 on Discord, or via some other means.\n";
|
||||
|
||||
/* TODO: Try to load dynamically? */
|
||||
/* FsStorage message_storage; */
|
||||
|
||||
@@ -79,13 +79,13 @@ namespace ams::fatal::srv {
|
||||
std::snprintf(file_path, sizeof(file_path) - 1, "sdmc:/atmosphere/fatal_reports/%011lu_%016lx.log", timestamp, static_cast<u64>(this->context->program_id));
|
||||
ScopedFile file(file_path);
|
||||
if (file.IsOpen()) {
|
||||
file.WriteFormat(u8"Atmosphère Fatal Report (v1.1):\n");
|
||||
file.WriteFormat("Atmosphère Fatal Report (v1.1):\n");
|
||||
file.WriteFormat("Result: 0x%X (2%03d-%04d)\n\n", this->context->result.GetValue(), this->context->result.GetModule(), this->context->result.GetDescription());
|
||||
file.WriteFormat("Program ID: %016lx\n", static_cast<u64>(this->context->program_id));
|
||||
if (strlen(this->context->proc_name)) {
|
||||
file.WriteFormat("Process Name: %s\n", this->context->proc_name);
|
||||
}
|
||||
file.WriteFormat(u8"Firmware: %s (Atmosphère %u.%u.%u-%s)\n", GetFatalConfig().GetFirmwareVersion().display_version, ATMOSPHERE_RELEASE_VERSION, ams::GetGitRevision());
|
||||
file.WriteFormat("Firmware: %s (Atmosphère %u.%u.%u-%s)\n", GetFatalConfig().GetFirmwareVersion().display_version, ATMOSPHERE_RELEASE_VERSION, ams::GetGitRevision());
|
||||
|
||||
if (this->context->cpu_ctx.architecture == CpuContext::Architecture_Aarch32) {
|
||||
file.WriteFormat("General Purpose Registers:\n");
|
||||
|
||||
@@ -213,18 +213,18 @@ namespace ams::fatal::srv {
|
||||
font::AddSpacingLines(0.5f);
|
||||
font::PrintFormatLine( "Program: %016lX", static_cast<u64>(this->context->program_id));
|
||||
font::AddSpacingLines(0.5f);
|
||||
font::PrintFormatLine(u8"Firmware: %s (Atmosphère %u.%u.%u-%s)", config.GetFirmwareVersion().display_version, ATMOSPHERE_RELEASE_VERSION, ams::GetGitRevision());
|
||||
font::PrintFormatLine("Firmware: %s (Atmosphère %u.%u.%u-%s)", config.GetFirmwareVersion().display_version, ATMOSPHERE_RELEASE_VERSION, ams::GetGitRevision());
|
||||
font::AddSpacingLines(1.5f);
|
||||
if (!exosphere::ResultVersionMismatch::Includes(this->context->result)) {
|
||||
font::Print(config.GetErrorDescription());
|
||||
} else {
|
||||
/* Print a special message for atmosphere version mismatch. */
|
||||
font::Print(u8"Atmosphère version mismatch detected.\n\n"
|
||||
u8"Please press the POWER Button to restart the console normally, or a VOL button\n"
|
||||
u8"to reboot to a payload (or RCM, if none is present). If you are unable to\n"
|
||||
u8"restart the console, hold the POWER Button for 12 seconds to turn the console off.\n\n"
|
||||
u8"Please ensure that all Atmosphère components are updated.\n"
|
||||
u8"github.com/Atmosphere-NX/Atmosphere/releases\n");
|
||||
font::Print("Atmosphère version mismatch detected.\n\n"
|
||||
"Please press the POWER Button to restart the console normally, or a VOL button\n"
|
||||
"to reboot to a payload (or RCM, if none is present). If you are unable to\n"
|
||||
"restart the console, hold the POWER Button for 12 seconds to turn the console off.\n\n"
|
||||
"Please ensure that all Atmosphère components are updated.\n"
|
||||
"github.com/Atmosphere-NX/Atmosphere/releases\n");
|
||||
}
|
||||
|
||||
/* Add a line. */
|
||||
|
||||
Reference in New Issue
Block a user