libstrat: namespace remaining non-namespaced code. more new-ipc updates

This commit is contained in:
Michael Scire 2019-10-19 17:42:53 -07:00 committed by SciresM
parent ae2fa2fa60
commit 0b22af1206
68 changed files with 1257 additions and 2118 deletions

View file

@ -49,13 +49,18 @@ extern "C" {
alignas(16) u8 __nx_exception_stack[0x1000];
u64 __nx_exception_stack_size = sizeof(__nx_exception_stack);
void __libnx_exception_handler(ThreadExceptionDump *ctx);
void __libstratosphere_exception_handler(AtmosphereFatalErrorContext *ctx);
}
sts::ncm::TitleId __stratosphere_title_id = sts::ncm::TitleId::Fatal;
namespace sts::ams {
ncm::TitleId StratosphereTitleId = ncm::TitleId::Fatal;
}
using namespace sts;
void __libnx_exception_handler(ThreadExceptionDump *ctx) {
StratosphereCrashHandler(ctx);
ams::CrashHandler(ctx);
}
void __libnx_initheap(void) {
@ -70,12 +75,10 @@ void __libnx_initheap(void) {
fake_heap_end = (char*)addr + size;
}
using namespace sts;
void __appInit(void) {
hos::SetVersionForLibnx();
DoWithSmSession([&]() {
sm::DoWithSession([&]() {
R_ASSERT(setInitialize());
R_ASSERT(setsysInitialize());
R_ASSERT(pminfoInitialize());
@ -98,7 +101,7 @@ void __appInit(void) {
R_ASSERT(fsdevMountSdmc());
/* fatal cannot throw fatal, so don't do: CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION); */
/* fatal cannot throw fatal, so don't do: ams::CheckApiVersion(); */
}
void __appExit(void) {

View file

@ -91,7 +91,7 @@ namespace sts::fatal::srv {
if (strlen(this->context->proc_name)) {
fprintf(f_report, "Process Name: %s\n", this->context->proc_name);
}
fprintf(f_report, u8"Firmware: %s (Atmosphère %u.%u.%u-%s)\n", GetFatalConfig().GetFirmwareVersion().display_version, CURRENT_ATMOSPHERE_VERSION, GetAtmosphereGitRevision());
fprintf(f_report, u8"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) {
fprintf(f_report, "General Purpose Registers:\n");

View file

@ -189,7 +189,7 @@ namespace sts::fatal::srv {
const FatalConfig &config = GetFatalConfig();
/* Prepare screen for drawing. */
DoWithSmSession([&]() {
sm::DoWithSession([&]() {
R_ASSERT(PrepareScreenForDrawing());
});
@ -222,7 +222,7 @@ namespace sts::fatal::srv {
font::AddSpacingLines(0.5f);
font::PrintFormatLine("Title: %016lX", static_cast<u64>(this->context->title_id));
font::AddSpacingLines(0.5f);
font::PrintFormatLine(u8"Firmware: %s (Atmosphère %u.%u.%u-%s)", config.GetFirmwareVersion().display_version, CURRENT_ATMOSPHERE_VERSION, GetAtmosphereGitRevision());
font::PrintFormatLine(u8"Firmware: %s (Atmosphère %u.%u.%u-%s)", config.GetFirmwareVersion().display_version, ATMOSPHERE_RELEASE_VERSION, ams::GetGitRevision());
font::AddSpacingLines(1.5f);
if (this->context->error_code != ResultAtmosphereVersionMismatch) {
font::Print(config.GetErrorDescription());