mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 17:14:28 -04:00
libstrat: namespace remaining non-namespaced code. more new-ipc updates
This commit is contained in:
parent
ae2fa2fa60
commit
0b22af1206
68 changed files with 1257 additions and 2118 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <cstring>
|
||||
|
||||
#include <switch.h>
|
||||
#include <atmosphere.h>
|
||||
#include <stratosphere.hpp>
|
||||
|
||||
#include "spl_api_impl.hpp"
|
||||
|
@ -38,7 +39,7 @@ extern "C" {
|
|||
|
||||
u32 __nx_applet_type = AppletType_None;
|
||||
|
||||
#define INNER_HEAP_SIZE 0x28000
|
||||
#define INNER_HEAP_SIZE 0x4000
|
||||
size_t nx_inner_heap_size = INNER_HEAP_SIZE;
|
||||
char nx_inner_heap[INNER_HEAP_SIZE];
|
||||
|
||||
|
@ -50,16 +51,20 @@ 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::Spl;
|
||||
namespace sts::ams {
|
||||
|
||||
ncm::TitleId StratosphereTitleId = ncm::TitleId::Spl;
|
||||
|
||||
}
|
||||
|
||||
using namespace sts;
|
||||
|
||||
void __libnx_exception_handler(ThreadExceptionDump *ctx) {
|
||||
StratosphereCrashHandler(ctx);
|
||||
ams::CrashHandler(ctx);
|
||||
}
|
||||
|
||||
|
||||
void __libnx_initheap(void) {
|
||||
void* addr = nx_inner_heap;
|
||||
size_t size = nx_inner_heap_size;
|
||||
|
@ -72,12 +77,12 @@ void __libnx_initheap(void) {
|
|||
fake_heap_end = (char*)addr + size;
|
||||
}
|
||||
|
||||
using namespace sts;
|
||||
|
||||
void __appInit(void) {
|
||||
hos::SetVersionForLibnx();
|
||||
|
||||
/* SPL doesn't really access any services... */
|
||||
|
||||
ams::CheckApiVersion();
|
||||
}
|
||||
|
||||
void __appExit(void) {
|
||||
|
@ -149,4 +154,4 @@ int main(int argc, char **argv)
|
|||
g_server_manager.LoopProcess();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue