diff --git a/sysmodules/rosalina/source/MyThread.c b/sysmodules/rosalina/source/MyThread.c index 6d420f5..8ede9eb 100644 --- a/sysmodules/rosalina/source/MyThread.c +++ b/sysmodules/rosalina/source/MyThread.c @@ -26,10 +26,22 @@ #include "MyThread.h" #include "memory.h" +#include <3ds/srv.h> static void _thread_begin(void* arg) { MyThread *t = (MyThread *)arg; + + // ROSALINA HACKJOB BEGIN + // NORMAL APPS SHOULD NOT DO THIS, EVER + u32 *tls = (u32 *)getThreadLocalStorage(); + memset(tls, 0, 0x80); + tls[0] = 0x21545624; + // ROSALINA HACKJOB END + + // Rosalina specific: + srvSetBlockingPolicy(true); // GetServiceHandle nonblocking if service port is full + t->ep(); MyThread_Exit(); } diff --git a/sysmodules/rosalina/source/main.c b/sysmodules/rosalina/source/main.c index e75ffac..1dafa6a 100644 --- a/sysmodules/rosalina/source/main.c +++ b/sysmodules/rosalina/source/main.c @@ -89,6 +89,16 @@ void initSystem() ProcessPatchesMenu_PatchUnpatchFSDirectly(); __sync_init(); __appInit(); + + // ROSALINA HACKJOB BEGIN + // NORMAL APPS SHOULD NOT DO THIS, EVER + u32 *tls = (u32 *)getThreadLocalStorage(); + memset(tls, 0, 0x80); + tls[0] = 0x21545624; + // ROSALINA HACKJOB END + + // Rosalina specific: + srvSetBlockingPolicy(true); // GetServiceHandle nonblocking if service port is full } bool terminationRequest = false;