mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-22 20:06:40 +00:00
Stratosphere: Properly overwrite appInit/appExit for libnx in loader
This commit is contained in:
parent
f0759b0afc
commit
d39c3b8efc
1 changed files with 17 additions and 7 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "ldr_debug_monitor.hpp"
|
||||
#include "ldr_shell.hpp"
|
||||
|
||||
extern "C" {
|
||||
extern u32 __start__;
|
||||
|
||||
u32 __nx_applet_type = AppletType_None;
|
||||
|
@ -21,6 +22,13 @@ u32 __nx_applet_type = AppletType_None;
|
|||
size_t nx_inner_heap_size = INNER_HEAP_SIZE;
|
||||
char nx_inner_heap[INNER_HEAP_SIZE];
|
||||
|
||||
void __libnx_initheap(void);
|
||||
void __appInit(void);
|
||||
void __appExit(void);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void __libnx_initheap(void) {
|
||||
void* addr = nx_inner_heap;
|
||||
size_t size = nx_inner_heap_size;
|
||||
|
@ -49,9 +57,11 @@ void __appInit(void) {
|
|||
if (R_FAILED(rc))
|
||||
fatalSimple(0xCAFE << 4 | 1);
|
||||
|
||||
/* Disable.
|
||||
rc = fsldrInitialize();
|
||||
if (R_FAILED(rc))
|
||||
fatalSimple(0xCAFE << 4 | 2);
|
||||
*/
|
||||
|
||||
fsdevInit();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue