Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
HookedBehemoth committed May 6, 2020
1 parent 298aa5d commit dd877c8
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ extern u32 __start__;

u32 __nx_applet_type = AppletType_None;

#define INNER_HEAP_SIZE 0x0
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);
Expand All @@ -22,15 +18,11 @@ void __libnx_exception_handler(ThreadExceptionDump *ctx);
}

void __libnx_initheap(void) {
void *addr = nx_inner_heap;
size_t size = nx_inner_heap_size;

// Newlib
extern char *fake_heap_start;
extern char *fake_heap_end;

fake_heap_start = (char *)addr;
fake_heap_end = (char *)addr + size;
fake_heap_start = nullptr;
fake_heap_end = nullptr;
}

#define R_ABORT_UNLESS(res_expr) \
Expand All @@ -44,8 +36,8 @@ void __libnx_initheap(void) {
bool initialized = false;

void __attribute__((weak)) __appInit(void) {
if ((armGetSystemTick() / armGetSystemTickFreq()) < 10)
svcSleepThread(5'000'000'000);
while ((armGetSystemTick() / armGetSystemTickFreq()) < 10)
svcSleepThread(1'000'000'000);

R_ABORT_UNLESS(smInitialize());
{
Expand Down

0 comments on commit dd877c8

Please sign in to comment.